com.sun.xml.ws.api.pipe.helper
Class AbstractFilterTubeImpl

java.lang.Object
  extended by com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
      extended by com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
All Implemented Interfaces:
Pipe, Tube
Direct Known Subclasses:
AbstractSchemaValidationTube, DumpTube, HandlerTube, MUTube, WsaTube

public abstract class AbstractFilterTubeImpl
extends AbstractTubeImpl

Convenient default implementation for filtering Tube.

In this prototype, this is not that convenient, but in the real production code where we have preDestroy() and clone(), this is fairly handy.


Field Summary
protected  Tube next
           
 
Constructor Summary
protected AbstractFilterTubeImpl(AbstractFilterTubeImpl that, TubeCloner cloner)
           
protected AbstractFilterTubeImpl(Tube next)
           
 
Method Summary
 void preDestroy()
          Invoked before the last copy of the pipeline is about to be discarded, to give Tubes a chance to clean up any resources.
 NextAction processException(Throwable t)
          Default no-op implementation.
 NextAction processRequest(Packet request)
          Default no-op implementation.
 NextAction processResponse(Packet response)
          Default no-op implementation.
 
Methods inherited from class com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
copy, copy, doInvoke, doInvokeAndForget, doReturnWith, doSuspend, doThrow, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

protected final Tube next
Constructor Detail

AbstractFilterTubeImpl

protected AbstractFilterTubeImpl(Tube next)

AbstractFilterTubeImpl

protected AbstractFilterTubeImpl(AbstractFilterTubeImpl that,
                                 TubeCloner cloner)
Method Detail

processRequest

@NotNull
public NextAction processRequest(Packet request)
Default no-op implementation.

Parameters:
request - The packet that represents a request message. If the packet has a non-null message, it must be a valid unconsumed Message. This message represents the SOAP message to be sent as a request.

The packet is also allowed to carry no message, which indicates that this is an output-only request. (that's called "solicit", right? - KK)

Returns:
A NextAction object that represents the next action to be taken by the JAX-WS runtime.

processResponse

@NotNull
public NextAction processResponse(Packet response)
Default no-op implementation.

Parameters:
response - If the packet has a non-null message, it must be a valid unconsumed Message. This message represents a response to the request message passed to Tube.processRequest(Packet) earlier.

The packet is also allowed to carry no message, which indicates that there was no response. This is used for things like one-way message and/or one-way transports. TODO: exception handling semantics need more discussion

Returns:
A NextAction object that represents the next action to be taken by the JAX-WS runtime.

processException

@NotNull
public NextAction processException(Throwable t)
Default no-op implementation.

Returns:
A NextAction object that represents the next action to be taken by the JAX-WS runtime.

preDestroy

public void preDestroy()
Description copied from interface: Tube
Invoked before the last copy of the pipeline is about to be discarded, to give Tubes 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.