|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.api.server.InstanceResolver<T>
com.sun.xml.ws.api.server.AbstractInstanceResolver<T>
com.sun.xml.ws.server.SingletonResolver<T>
public final class SingletonResolver<T>
InstanceResolver
that always returns a single instance.
Constructor Summary | |
---|---|
SingletonResolver(T singleton)
|
Method Summary | |
---|---|
void |
dispose()
Called by WSEndpoint
when WSEndpoint.dispose() is called. |
T |
resolve(Packet request)
Decides which instance of 'T' serves the given request message. |
void |
start(WSWebServiceContext wsc,
WSEndpoint endpoint)
Called by WSEndpoint when it's set up. |
Methods inherited from class com.sun.xml.ws.api.server.AbstractInstanceResolver |
---|
findAnnotatedMethod, getResourceInjector, invokeMethod |
Methods inherited from class com.sun.xml.ws.api.server.InstanceResolver |
---|
createDefault, createDefault, createFromInstanceResolverAnnotation, createInvoker, createNewInstance, createSingleton, postInvoke, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingletonResolver(@NotNull T singleton)
Method Detail |
---|
@NotNull public T resolve(Packet request)
InstanceResolver
This method is called concurrently by multiple threads. It is also on a criticail path that affects the performance. A good implementation should try to avoid any synchronization, and should minimize the amount of work as much as possible.
resolve
in class InstanceResolver<T>
request
- Always non-null. Represents the request message to be served.
The caller may not consume the Message
.public void start(WSWebServiceContext wsc, WSEndpoint endpoint)
InstanceResolver
WSEndpoint
when it's set up.
This is an opportunity for InstanceResolver
to do a endpoint-specific initialization process.
start
in class InstanceResolver<T>
wsc
- The WebServiceContext
instance to be injected
to the user instances (assuming InstanceResolver
public void dispose()
InstanceResolver
WSEndpoint
when WSEndpoint.dispose()
is called.
This allows InstanceResolver
to do final clean up.
This method is guaranteed to be only called once by WSEndpoint
.
dispose
in class InstanceResolver<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |