Class ServerWorker

  • All Implemented Interfaces:
    Runnable

    public class ServerWorker
    extends Object
    implements Runnable
    This is a worker thread for executing an incoming request in to the transport.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
      • 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
      • 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 request
        method - 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 request
        method - HTTP Method of the request
      • getSourceConfiguration

        public SourceConfiguration getSourceConfiguration()
        Get the shared pass-through source configuration
        Returns:
        source configuration