Package org.gcube.data.analysis.wps
Class RequestHandler
- java.lang.Object
-
- org.gcube.data.analysis.wps.RequestHandler
-
public class RequestHandler extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected OutputStreamosprotected static org.n52.wps.server.handler.RequestExecutorpoolComputation timeout in secondsprotected org.n52.wps.server.request.Requestreqprotected StringresponseMimeTypestatic StringVERSION_ATTRIBUTE_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedRequestHandler()RequestHandler(InputStream is, OutputStream os, org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.EnvironmentVariableManager env)Handles requests of type HTTP_POST (currently executeProcess).RequestHandler(Map<String,String[]> params, OutputStream os, org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.EnvironmentVariableManager env)Handles requests of type HTTP_GET (currently capabilities and describeProcess).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetResponseMimeType()voidhandle()Handle a request after its type is determined.protected voidsetResponseMimeType(ExecuteRequest req)
-
-
-
Field Detail
-
VERSION_ATTRIBUTE_NAME
public static final String VERSION_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
pool
protected static org.n52.wps.server.handler.RequestExecutor pool
Computation timeout in seconds
-
os
protected OutputStream os
-
responseMimeType
protected String responseMimeType
-
req
protected org.n52.wps.server.request.Request req
-
-
Constructor Detail
-
RequestHandler
protected RequestHandler()
-
RequestHandler
public RequestHandler(Map<String,String[]> params, OutputStream os, org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.EnvironmentVariableManager env) throws org.n52.wps.server.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:
org.n52.wps.server.ExceptionReport- If the requested operation is not supported
-
RequestHandler
public RequestHandler(InputStream is, OutputStream os, org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.EnvironmentVariableManager env) throws org.n52.wps.server.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:
org.n52.wps.server.ExceptionReport
-
-
Method Detail
-
handle
public void handle() throws org.n52.wps.server.ExceptionReportHandle 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:
org.n52.wps.server.ExceptionReport
-
setResponseMimeType
protected void setResponseMimeType(ExecuteRequest req)
-
getResponseMimeType
public String getResponseMimeType()
-
-