org.n52.wps.server.handler
Class RequestHandler
java.lang.Object
org.n52.wps.server.handler.RequestHandler
- Direct Known Subclasses:
- SOAPRequestHandler
public class RequestHandler
- extends java.lang.Object
This class accepts client requests, determines its type and then schedules
the ExecuteRequest's for execution. The request is executed for a
short time, within the client will be served with an immediate result. If the
time runs out, the client will be served with a reference to the future
result. The client can come back later to retrieve the result. Uses
"computation_timeout_seconds" from wps.properties
- Author:
- Timon ter Braak
|
Constructor Summary |
protected |
RequestHandler()
|
|
RequestHandler(java.io.InputStream is,
java.io.OutputStream os)
Handles requests of type HTTP_POST (currently executeProcess). |
|
RequestHandler(java.util.Map<java.lang.String,java.lang.String[]> params,
java.io.OutputStream os)
Handles requests of type HTTP_GET (currently capabilities and
describeProcess). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sleepingTime
protected int sleepingTime
pool
protected static RequestExecutor pool
os
protected java.io.OutputStream os
responseMimeType
protected java.lang.String responseMimeType
req
protected Request req
RequestHandler
protected RequestHandler()
RequestHandler
public RequestHandler(java.util.Map<java.lang.String,java.lang.String[]> params,
java.io.OutputStream os)
throws ExceptionReport
- Handles requests of type HTTP_GET (currently capabilities and
describeProcess). A Map is used to represent the client input.
- Parameters:
params - The client inputos - The OutputStream to write the response to.
- Throws:
ExceptionReport - If the requested operation is not supported
RequestHandler
public RequestHandler(java.io.InputStream is,
java.io.OutputStream os)
throws ExceptionReport
- Handles requests of type HTTP_POST (currently executeProcess). A Document
is used to represent the client input. This Document must first be parsed
from an InputStream.
- Parameters:
is - The client inputos - The OutputStream to write the response to.
- Throws:
ExceptionReport
handle
public void handle()
throws ExceptionReport
- Handle a request after its type is determined. The request is scheduled
for execution. If the server has enough free resources, the client will
be served immediately. If time runs out, the client will be asked to come
back later with a reference to the result.
- Parameters:
req - The request of the client.
- Throws:
ExceptionReport
setResponseMimeType
protected void setResponseMimeType(ExecuteRequest req)
getResponseMimeType
public java.lang.String getResponseMimeType()
Copyright © 2007-2011 52north.org. All Rights Reserved.