public class OTPResponseFilter extends java.lang.Object implements IResponseFilter
|Modifier and Type||Method and Description|
Filters the specified receive event and optionally passes on the control to the rest of the chain.
Returns a descriptor, which is a value-object that can be used to identify the filter for the purpose of chain transformation.
public java.lang.Object filter(IReceiveEvent event, IResponseFilterChain chain) throws java.io.IOException
IResponseFilter.RESTART_SIGNALyields the cancellation of the conversation flow.
IResponseFilter.RESTART_SIGNAL results in the entire flow to be restarted, unless the maximum number of restarts is reached. Note that request parameter/header modifications performed by
request filters and the request listener remain in place within the flow. The original conversation object will not be modified though.
Implementations performing potentially long-running operations are expected to inspect the return value of
IBaseEvent.isCancelledExternally() and return if it signals true.
Note that due to buffering, reading from the stream/writer after having invoked
IResponseFilterChain.filter() on the argument will re-read the response from the beginning. Most
filter implementations are expected to pass on control to the chain as the very end of processing.
Passing control over to the rest of the chain is done as follows:
event- the event, must be non-null
chain- the chain, must be non-null
java.io.IOException- in case of problems reading from the stream/reader
public java.lang.Object getDescriptor()