Package com.sun.xml.ws.api.server
Class AbstractServerAsyncTransport<T>
- java.lang.Object
-
- com.sun.xml.ws.api.server.AbstractServerAsyncTransport<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractServerAsyncTransport(WSEndpoint endpoint)WSEndpoint.setExecutor(java.util.concurrent.Executor)should be called before creating the transport
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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 voidhandle(T connection)Reads and decodes infoset from the connection and invokes the endpoints.
-
-
-
Constructor Detail
-
AbstractServerAsyncTransport
public AbstractServerAsyncTransport(WSEndpoint endpoint)
WSEndpoint.setExecutor(java.util.concurrent.Executor)should be called before creating the transport- Parameters:
endpoint- webservices requests are directed towards this endpoint
-
-
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 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
@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)
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
@NotNull protected abstract PropertySet getPropertySet(T connection)
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
@NotNull protected abstract WebServiceContextDelegate getWebServiceContextDelegate(T connection)
Return aWebServiceContextDelegateusing 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
-
-