|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.api.server.Adapter<TK>
public abstract class Adapter<TK extends Adapter.Toolkit>
Receives incoming messages from a transport (such as HTTP, JMS, etc)
in a transport specific way, and delivers it to WSEndpoint.PipeHead.process(com.sun.xml.ws.api.message.Packet, com.sun.xml.ws.api.server.WebServiceContextDelegate, com.sun.xml.ws.api.server.TransportBackChannel).
Since this class mostly concerns itself with converting a
transport-specific message representation to a Packet,
the name is the "adapter".
The purpose of this class is twofolds:
Packet and do the other way around.
WSEndpoint.PipeHead,
and Codec.
Adapters are extended to work with each kind of transport,
and therefore Adapter class itself is not all that
useful by itself --- it merely provides a design template
that can be followed.
For managing resources, an adapter uses an object called Adapter.Toolkit
(think of it as a tray full of tools that a dentist uses ---
trays are identical, but each patient has to get one. You have
a pool of them and you assign it to a patient.)
Adapter.Toolkit can be extended by derived classes.
That actual type is the TK type parameter this class takes.
| Nested Class Summary | |
|---|---|
class |
Adapter.Toolkit
Object that groups all thread-unsafe resources. |
| Field Summary | |
|---|---|
protected WSEndpoint<?> |
endpoint
|
protected Pool<TK> |
pool
Pool of Adapter.Toolkits. |
| Constructor Summary | |
|---|---|
protected |
Adapter(WSEndpoint endpoint)
Creates an Adapter that delivers
messages to the given endpoint. |
| Method Summary | |
|---|---|
protected abstract TK |
createToolkit()
Creates a Adapter.Toolkit instance. |
WSEndpoint<?> |
getEndpoint()
Gets the endpoint that this Adapter is serving. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final WSEndpoint<?> endpoint
protected final Pool<TK extends Adapter.Toolkit> pool
Adapter.Toolkits.
| Constructor Detail |
|---|
protected Adapter(WSEndpoint endpoint)
Adapter that delivers
messages to the given endpoint.
| Method Detail |
|---|
public WSEndpoint<?> getEndpoint()
Adapter is serving.
protected abstract TK createToolkit()
Adapter.Toolkit instance.
If the derived class doesn't have to add any per-thread state
to Adapter.Toolkit, simply implement this as new Toolkit().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||