Package com.sun.xml.ws.api.server
Class AbstractServerAsyncTransport<T>
java.lang.Object
com.sun.xml.ws.api.server.AbstractServerAsyncTransport<T>
Partial server side async transport implementation. It manages pooling of
Codec and other details.- Author:
- Jitendra Kotamraju
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractServerAsyncTransport(WSEndpoint endpoint) WSEndpoint.setExecutor(java.util.concurrent.Executor)should be called before creating the transport -
Method Summary
Modifier and TypeMethodDescriptionprotected PacketdecodePacket(T connection, Codec codec) decodes the transport data to Packetprotected abstract voidencodePacket(T connection, Packet packet, Codec codec) Encodes thePacketto infoset and writes on the connection.protected abstract StringgetAcceptableMimeTypes(T connection) If the request has Accept header, return that valueprotected abstract PropertySetgetPropertySet(T connection) If there are any properties associated with the connection, those will be added toPacketprotected abstract TransportBackChannelgetTransportBackChannel(T connection) TransportBackChannelused by jax-ws runtime to close the connection while the processing of the request is still continuing.protected abstract WebServiceContextDelegategetWebServiceContextDelegate(T connection) Return aWebServiceContextDelegateusing the underlying connection.protected voidReads and decodes infoset from the connection and invokes the endpoints.
-
Constructor Details
-
AbstractServerAsyncTransport
WSEndpoint.setExecutor(java.util.concurrent.Executor)should be called before creating the transport- Parameters:
endpoint- webservices requests are directed towards this endpoint
-
-
Method Details
-
decodePacket
decodes the transport data to Packet- Parameters:
connection- that carries the web service requestcodec- for encoding/decodingMessage- 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 thePacketto infoset and writes on the connection.- Parameters:
connection- that carries the web service requestpacket- that needs to encoded to infosetcodec- that does the encoding of Packet- Throws:
IOException- if an i/o error happens while encoding/decoding
-
getAcceptableMimeTypes
If the request has Accept header, return that value- Parameters:
connection- that carries the web service request- Returns:
- Accept MIME types
-
getTransportBackChannel
TransportBackChannelused 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
If there are any properties associated with the connection, those will be added toPacket- Parameters:
connection- that carries the web service request- Returns:
PropertySetfor the connection
-
getWebServiceContextDelegate
Return aWebServiceContextDelegateusing the underlying connection.- Parameters:
connection- that carries the web service request- Returns:
- non-null WebServiceContextDelegate instance
-
handle
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
-