One instance of {@link WSEndpoint} is created for each deployed serviceendpoint. A hosted service usually handles multiple concurrent requests. To do this efficiently, an endpoint handles incoming {@link Packet} through {@link PipeHead}s, where many copies can be created for each endpoint.
Each {@link PipeHead} is thread-unsafe, and request needs to beserialized. A {@link PipeHead} represents a sizable resource(in particular a whole pipeline), so the caller is expected to reuse them and avoid excessive allocations as much as possible. Making {@link PipeHead}s thread-unsafe allow the JAX-WS RI internal to tie thread-local resources to {@link PipeHead}, and reduce the total resource management overhead.
To abbreviate this resource management (and for a few other reasons), JAX-WS RI provides {@link Adapter} class. If you are hosting a JAX-WSservice, you'll most likely want to send requests to {@link WSEndpoint}through {@link Adapter}.
{@link WSEndpoint} is ready to handle {@link Packet}s as soon as it's created. No separate post-initialization step is necessary. However, to comply with the JAX-WS spec requirement, the caller is expected to call the {@link #dispose()} method to allow anorderly shut-down of a hosted service.
{@link WSEndpoint} exposes a series of information that representshow an endpoint is configured to host a service. See the getXXX methods for more details.
{@link WSEndpoint} owns a {@link WSWebServiceContext} implementation.But a bulk of the work is delegated to {@link WebServiceContextDelegate}, which is passed in as a parameter to {@link PipeHead#process(Packet,WebServiceContextDelegate,TransportBackChannel)}. @author Kohsuke Kawaguchi
|
|
|
|
|
|