Class ServerWorker
- java.lang.Object
-
- org.apache.synapse.transport.nhttp.ServerWorker
-
-
Constructor Summary
Constructors Constructor Description ServerWorker(org.apache.axis2.context.ConfigurationContext cfgCtx, String schemeName, org.apache.axis2.transport.base.MetricsCollector metrics, org.apache.http.nio.NHttpServerConnection conn, ServerHandler serverHandler, org.apache.http.HttpRequest request, InputStream is, org.apache.http.HttpResponse response, OutputStream os, boolean isRestDispatching, HttpGetRequestProcessor httpGetRequestProcessor)
Create a new server side worker to process an incoming message and optionally begin creating its output.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.nio.NHttpServerConnection
getConn()
InputStream
getIs()
OutputStream
getOutputStream()
String
getRemoteAddress()
org.apache.http.HttpResponse
getResponse()
ServerHandler
getServiceHandler()
void
run()
Process the incoming request
-
-
-
Constructor Detail
-
ServerWorker
public ServerWorker(org.apache.axis2.context.ConfigurationContext cfgCtx, String schemeName, org.apache.axis2.transport.base.MetricsCollector metrics, org.apache.http.nio.NHttpServerConnection conn, ServerHandler serverHandler, org.apache.http.HttpRequest request, InputStream is, org.apache.http.HttpResponse response, OutputStream os, boolean isRestDispatching, HttpGetRequestProcessor httpGetRequestProcessor)
Create a new server side worker to process an incoming message and optionally begin creating its output. This however does not force the processor to write a response back as the traditional servlet service() method, but creates the background required to write the response, if one would be created.- Parameters:
cfgCtx
- the configuration contextmetrics
- metrics collectorconn
- the underlying http connectionserverHandler
- the handler of the server side messagesrequest
- the http request received (might still be in the process of being streamed)is
- the stream input stream to read the request bodyresponse
- the response to be populated if applicableos
- the output stream to write the response body if one is applicable
-
-
Method Detail
-
getResponse
public org.apache.http.HttpResponse getResponse()
-
getOutputStream
public OutputStream getOutputStream()
-
getIs
public InputStream getIs()
-
getServiceHandler
public ServerHandler getServiceHandler()
-
getConn
public org.apache.http.nio.NHttpServerConnection getConn()
-
getRemoteAddress
public String getRemoteAddress()
-
-