Package com.sun.xml.ws.server
Class InvokerTube<T>
- java.lang.Object
-
- com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
-
- com.sun.xml.ws.server.sei.InvokerTube<Invoker>
-
- com.sun.xml.ws.server.InvokerTube<T>
-
- All Implemented Interfaces:
Pipe
,Tube
,EndpointAwareTube
,InvokerSource<Invoker>
- Direct Known Subclasses:
ProviderInvokerTube
,SEIInvokerTube
public abstract class InvokerTube<T> extends InvokerTube<Invoker> implements EndpointAwareTube
Base code forProviderInvokerTube
andSEIInvokerTube
.This hides
InstanceResolver
and performs a set up necessary forWebServiceContext
to correctly.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from class com.sun.xml.ws.server.sei.InvokerTube
invoker
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
InvokerTube(Invoker invoker)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractTubeImpl
copy(TubeCloner cloner)
processRequest() and processResponse() do not share any instance variables while processing the request.static Packet
getCurrentPacket()
This method can be called while the user service is servicing the request synchronously, to obtain the current request packet.protected WSEndpoint
getEndpoint()
Invoker
getInvoker(Packet request)
Returns theInvoker
object that serves the request.void
preDestroy()
Invoked before the last copy of the pipeline is about to be discarded, to giveTube
s a chance to clean up any resources.void
setEndpoint(WSEndpoint endpoint)
Setter for WSEndpoint holding this tube-
Methods inherited from class com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
copy, doInvoke, doInvokeAndForget, doReturnWith, doSuspend, doSuspend, doSuspend, doSuspend, doThrow, doThrow, process
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.xml.ws.api.pipe.Tube
processException, processRequest, processResponse
-
-
-
-
Constructor Detail
-
InvokerTube
protected InvokerTube(Invoker invoker)
-
-
Method Detail
-
setEndpoint
public void setEndpoint(WSEndpoint endpoint)
Description copied from interface:EndpointAwareTube
Setter for WSEndpoint holding this tube- Specified by:
setEndpoint
in interfaceEndpointAwareTube
- Parameters:
endpoint
- WSEndpoint holding this tube
-
getEndpoint
protected WSEndpoint getEndpoint()
-
getInvoker
@NotNull public final Invoker getInvoker(Packet request)
Returns theInvoker
object that serves the request.- Specified by:
getInvoker
in interfaceInvokerSource<T>
- Overrides:
getInvoker
in classInvokerTube<Invoker>
- Parameters:
request
- Packet for request- Returns:
- Selected invoker
-
copy
public final AbstractTubeImpl copy(TubeCloner cloner)
processRequest() and processResponse() do not share any instance variables while processing the request.InvokerTube
is stateless and terminal, so no need to create copies.- Specified by:
copy
in interfaceTube
- Specified by:
copy
in classAbstractTubeImpl
- Parameters:
cloner
- Use this object (in particular itsTubeCloner.copy(Tube)
method to clone other pipe references you have in your pipe. SeeTubeCloner
for more discussion about why.- Returns:
- always non-null
Tube
.
-
preDestroy
public void preDestroy()
Description copied from interface:Tube
Invoked before the last copy of the pipeline is about to be discarded, to giveTube
s a chance to clean up any resources.This can be used to invoke
PreDestroy
lifecycle methods on user handler. The invocation of it is optional on the client side, but mandatory on the server side.When multiple copies of pipelines are created, this method is called only on one of them.
- Specified by:
preDestroy
in interfacePipe
- Specified by:
preDestroy
in interfaceTube
-
getCurrentPacket
@NotNull public static Packet getCurrentPacket()
This method can be called while the user service is servicing the request synchronously, to obtain the current request packet.This is primarily designed for
StatefulInstanceResolver
. Use with care.
-
-