Class AbstractServerAsyncTransport<T>


  • public abstract class AbstractServerAsyncTransport<T>
    extends Object
    Partial server side async transport implementation. It manages pooling of Codec and other details.
    Author:
    Jitendra Kotamraju
    • Method Detail

      • decodePacket

        protected Packet decodePacket​(T connection,
                                      @NotNull
                                      Codec codec)
                               throws IOException
        decodes the transport data to Packet
        Parameters:
        connection - that carries the web service request
        codec - for encoding/decoding Message
        Returns:
        decoded Packet
        Throws:
        IOException - if an i/o error happens while encoding/decoding
      • encodePacket

        protected abstract void encodePacket​(T connection,
                                             @NotNull
                                             Packet packet,
                                             @NotNull
                                             Codec codec)
                                      throws IOException
        Encodes the Packet to infoset and writes on the connection.
        Parameters:
        connection - that carries the web service request
        packet - that needs to encoded to infoset
        codec - that does the encoding of Packet
        Throws:
        IOException - if an i/o error happens while encoding/decoding
      • getAcceptableMimeTypes

        @Nullable
        protected abstract String getAcceptableMimeTypes​(T connection)
        If the request has Accept header, return that value
        Parameters:
        connection - that carries the web service request
        Returns:
        Accept MIME types
      • getTransportBackChannel

        @Nullable
        protected abstract TransportBackChannel getTransportBackChannel​(T connection)
        TransportBackChannel used by jax-ws runtime to close the connection while the processing of the request is still continuing. In oneway HTTP case, a response code needs to be sent before invoking the endpoint.
        Parameters:
        connection - that carries the web service request
        Returns:
        TransportBackChannel instance using the connection
      • getPropertySet

        @NotNull
        protected abstract PropertySet getPropertySet​(T connection)
        If there are any properties associated with the connection, those will be added to Packet
        Parameters:
        connection - that carries the web service request
        Returns:
        PropertySet for the connection
      • getWebServiceContextDelegate

        @NotNull
        protected abstract WebServiceContextDelegate getWebServiceContextDelegate​(T connection)
        Return a WebServiceContextDelegate using the underlying connection.
        Parameters:
        connection - that carries the web service request
        Returns:
        non-null WebServiceContextDelegate instance
      • handle

        protected void handle​(T connection)
                       throws IOException
        Reads and decodes infoset from the connection and invokes the endpoints. The response is encoded and written to the connection. The response could be written using a different thread.
        Parameters:
        connection - that carries the web service request
        Throws:
        IOException - if an i/o error happens while encoding/decoding