Class WSEndpoint<T>

java.lang.Object
com.sun.xml.ws.api.server.WSEndpoint<T>
All Implemented Interfaces:
Component, ComponentRegistry
Direct Known Subclasses:
ManagedEndpoint, WSEndpointImpl, WSEndpointMOMProxy

public abstract class WSEndpoint<T> extends Object implements ComponentRegistry
Root object that hosts the Packet processing code at the server.

One instance of WSEndpoint is created for each deployed service endpoint. A hosted service usually handles multiple concurrent requests. To do this efficiently, an endpoint handles incoming Packet through WSEndpoint.PipeHeads, where many copies can be created for each endpoint.

Each WSEndpoint.PipeHead is thread-unsafe, and request needs to be serialized. A WSEndpoint.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 WSEndpoint.PipeHeads thread-unsafe allow the JAX-WS RI internal to tie thread-local resources to WSEndpoint.PipeHead, and reduce the total resource management overhead.

To abbreviate this resource management (and for a few other reasons), JAX-WS RI provides Adapter class. If you are hosting a JAX-WS service, you'll most likely want to send requests to WSEndpoint through Adapter.

WSEndpoint is ready to handle Packets 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 dispose() method to allow an orderly shut-down of a hosted service.

Objects Exposed From Endpoint

WSEndpoint exposes a series of information that represents how an endpoint is configured to host a service. See the getXXX methods for more details.

Implementation Notes

WSEndpoint owns a WSWebServiceContext implementation. But a bulk of the work is delegated to WebServiceContextDelegate, which is passed in as a parameter to WSEndpoint.PipeHead.process(Packet, WebServiceContextDelegate, TransportBackChannel).

Author:
Kohsuke Kawaguchi