Class RequestHandler


  • public class RequestHandler
    extends Object
    • Field Detail

      • pool

        protected static org.n52.wps.server.handler.RequestExecutor pool
        Computation timeout in seconds
      • 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 input
        os - 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 input
        os - The OutputStream to write the response to.
        Throws:
        org.n52.wps.server.ExceptionReport
    • Method Detail

      • handle

        public void handle()
                    throws org.n52.wps.server.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:
        org.n52.wps.server.ExceptionReport
      • setResponseMimeType

        protected void setResponseMimeType​(ExecuteRequest req)
      • getResponseMimeType

        public String getResponseMimeType()