org.glassfish.jersey.process.internal
Interface ChainableAcceptor
- All Superinterfaces:
- LinearAcceptor
- All Known Implementing Classes:
- AbstractChainableAcceptor, FilteringAcceptor
public interface ChainableAcceptor
- extends LinearAcceptor
Linear acceptor that can be composed into a chain.
The acceptor exposes a method for setting a value of the
next acceptor in the chain that
should be returned from the chain by default.
The typical use case for implementing the acceptor is a logic that usually
needs to perform some logic, but unlike an acceptor created from a function it also needs to be able to decide to override
the default next acceptor and return a different acceptor, effectively branching
away from the original linear acceptor chain. This technique can be e.g. used
to break the accepting chain by returning a custom inflecting
acceptor, etc.
- Author:
- Marek Potociar (marek.potociar at oracle.com)
|
Method Summary |
void |
setDefaultNext(LinearAcceptor acceptor)
Set the default next acceptor that should be returned from the
linear acceptor after it has been invoked by default. |
setDefaultNext
void setDefaultNext(LinearAcceptor acceptor)
- Set the default next acceptor that should be returned from the
linear acceptor after it has been invoked by default.
- Parameters:
acceptor - the next default acceptor in the chain.
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.