public abstract class AbstractFilterPipeImpl extends AbstractPipeImpl
Pipe
that is used as a filter.
A filter pipe works on a Packet
, then pass it onto the next pipe.
Filter Pipe
s are ideal for those components that wish to
do some of the followings:
process(com.sun.xml.ws.api.message.Packet)
method and do some processing before
you pass the packet to the next pipe:
process(request) { doSomethingWith(request); return next.process(request); }
process(com.sun.xml.ws.api.message.Packet)
method and do some processing,
then do NOT pass the request onto the next pipe.
process(request) { if(isSomethingWrongWith(request)) return createErrorMessage(); else return next.proces(request); }
process(com.sun.xml.ws.api.message.Packet)
method and do some processing,
then do NOT pass the request onto the next pipe.
process(request) { op = request.getMessage().getOperation(); reply = next.proces(request); if(op is something I care) { reply = playWith(reply); } return reply; }
Modifier | Constructor and Description |
---|---|
protected |
AbstractFilterPipeImpl(AbstractFilterPipeImpl that,
PipeCloner cloner) |
protected |
AbstractFilterPipeImpl(Pipe next) |
Modifier and Type | Method and Description |
---|---|
void |
preDestroy()
Invoked before the last copy of the pipeline is about to be discarded,
to give
Pipe s a chance to clean up any resources. |
com.sun.xml.ws.api.message.Packet |
process(com.sun.xml.ws.api.message.Packet packet)
Sends a
Packet and returns a response Packet to it. |
protected final Pipe next
protected AbstractFilterPipeImpl(Pipe next)
protected AbstractFilterPipeImpl(AbstractFilterPipeImpl that, PipeCloner cloner)
public com.sun.xml.ws.api.message.Packet process(com.sun.xml.ws.api.message.Packet packet)
Pipe
Packet
and returns a response Packet
to it.packet
- The packet that represents a request message. Must not be null.
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)
Message
. This message represents
a response to the request message passed as a parameter.
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.
public void preDestroy()
Pipe
Pipe
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.
preDestroy
in interface Pipe
preDestroy
in class AbstractPipeImpl
Copyright © 2015 Oracle Corporation. All rights reserved.