org.glassfish.jersey.process.internal
Class AbstractChainableAcceptor

java.lang.Object
  extended by org.glassfish.jersey.process.internal.AbstractChainableAcceptor
All Implemented Interfaces:
ChainableAcceptor, LinearAcceptor
Direct Known Subclasses:
FilteringAcceptor

public abstract class AbstractChainableAcceptor
extends java.lang.Object
implements ChainableAcceptor

Abstract chainable linear acceptor. Implements support for managing the default next stage value.

Author:
Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.LinearAcceptor
LinearAcceptor.Builder
 
Constructor Summary
protected AbstractChainableAcceptor()
          Create a new chainable acceptor with no next stage set.
protected AbstractChainableAcceptor(LinearAcceptor nextStage)
          Create a new chainable acceptor with an initialized default next stage value.
 
Method Summary
 com.google.common.base.Optional<LinearAcceptor> getDefaultNext()
          Get the default next stage currently configured on the acceptor.
 void setDefaultNext(LinearAcceptor acceptor)
          Set the default next acceptor that should be returned from the linear acceptor after it has been invoked by default.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassfish.jersey.process.internal.LinearAcceptor
apply
 

Constructor Detail

AbstractChainableAcceptor

protected AbstractChainableAcceptor()
Create a new chainable acceptor with no next stage set.


AbstractChainableAcceptor

protected AbstractChainableAcceptor(LinearAcceptor nextStage)
Create a new chainable acceptor with an initialized default next stage value.

Parameters:
nextStage - default next stage.
Method Detail

setDefaultNext

public final void setDefaultNext(LinearAcceptor acceptor)
Description copied from interface: ChainableAcceptor
Set the default next acceptor that should be returned from the linear acceptor after it has been invoked by default.

Specified by:
setDefaultNext in interface ChainableAcceptor
Parameters:
acceptor - the next default acceptor in the chain.

getDefaultNext

public final com.google.common.base.Optional<LinearAcceptor> getDefaultNext()
Get the default next stage currently configured on the acceptor.

Returns:
default next stage currently configured on the acceptor.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.