Class ServerWorker
- java.lang.Object
-
- org.apache.synapse.transport.passthru.ServerWorker
-
-
Constructor Summary
Constructors Constructor Description ServerWorker(SourceRequest request, SourceConfiguration sourceConfiguration, OutputStream os)ServerWorker(SourceRequest request, SourceConfiguration sourceConfiguration, OutputStream os, long initiationTimestamp, String correlationId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.axis2.context.MessageContextcreateMessageContext(org.apache.axis2.context.MessageContext msgContext, SourceRequest request)Create an Axis2 message context for the given http request.org.apache.axis2.context.MessageContextgetRequestContext()SourceConfigurationgetSourceConfiguration()Get the shared pass-through source configurationSourceRequestgetSourceRequest()WorkerStategetWorkerState()org.apache.axiom.soap.SOAPEnvelopehandleRESTUrlPost(String contentTypeHdr)Method will setup the necessary parameters for the rest url post actionbooleanisRESTRequest(org.apache.axis2.context.MessageContext msgContext, String method)Adding REST related properties to the message context if request is RESTvoidprocessEntityEnclosingRequest(org.apache.axis2.context.MessageContext msgContext, boolean injectToAxis2Engine)voidprocessHttpRequestUri(org.apache.axis2.context.MessageContext msgContext, String method)Get Uri of underlying SourceRequest and calculate service prefix and add to message context create response buffers for HTTP GET, DELETE, OPTION and HEAD methodsvoidprocessNonEntityEnclosingRESTHandler(org.apache.axiom.soap.SOAPEnvelope soapEnvelope, org.apache.axis2.context.MessageContext msgContext, boolean injectToAxis2Engine)voidrun()voidsendAck(org.apache.axis2.context.MessageContext msgContext)voidsetSourceRequest(SourceRequest request)
-
-
-
Constructor Detail
-
ServerWorker
public ServerWorker(SourceRequest request, SourceConfiguration sourceConfiguration, OutputStream os)
-
ServerWorker
public ServerWorker(SourceRequest request, SourceConfiguration sourceConfiguration, OutputStream os, long initiationTimestamp, String correlationId)
-
-
Method Detail
-
handleRESTUrlPost
public org.apache.axiom.soap.SOAPEnvelope handleRESTUrlPost(String contentTypeHdr) throws FactoryConfigurationError
Method will setup the necessary parameters for the rest url post action- Returns:
- Throws:
FactoryConfigurationError
-
sendAck
public void sendAck(org.apache.axis2.context.MessageContext msgContext)
-
processNonEntityEnclosingRESTHandler
public void processNonEntityEnclosingRESTHandler(org.apache.axiom.soap.SOAPEnvelope soapEnvelope, org.apache.axis2.context.MessageContext msgContext, boolean injectToAxis2Engine)
-
processEntityEnclosingRequest
public void processEntityEnclosingRequest(org.apache.axis2.context.MessageContext msgContext, boolean injectToAxis2Engine)
-
createMessageContext
public org.apache.axis2.context.MessageContext createMessageContext(org.apache.axis2.context.MessageContext msgContext, SourceRequest request)Create an Axis2 message context for the given http request. The request may be in the process of being streamed- Parameters:
request- the http request to be used to create the corresponding Axis2 message context- Returns:
- the Axis2 message context created
-
getWorkerState
public WorkerState getWorkerState()
-
getRequestContext
public org.apache.axis2.context.MessageContext getRequestContext()
-
getSourceRequest
public SourceRequest getSourceRequest()
- Returns:
- Get SourceRequest Processed by ServerWorker
-
setSourceRequest
public void setSourceRequest(SourceRequest request)
- Parameters:
request- Set SourceRequest to be processed by ServerWorker
-
isRESTRequest
public boolean isRESTRequest(org.apache.axis2.context.MessageContext msgContext, String method)Adding REST related properties to the message context if request is REST- Parameters:
msgContext- Axis2MessageContext of the requestmethod- HTTP Method of the request- Returns:
- whether request is REST or SOAP
-
processHttpRequestUri
public void processHttpRequestUri(org.apache.axis2.context.MessageContext msgContext, String method)Get Uri of underlying SourceRequest and calculate service prefix and add to message context create response buffers for HTTP GET, DELETE, OPTION and HEAD methods- Parameters:
msgContext- Axis2MessageContext of the requestmethod- HTTP Method of the request
-
getSourceConfiguration
public SourceConfiguration getSourceConfiguration()
Get the shared pass-through source configuration- Returns:
- source configuration
-
-