org.glassfish.jersey.process.internal
Class DefaultRespondingContext<DATA>

java.lang.Object
  extended by org.glassfish.jersey.process.internal.DefaultRespondingContext<DATA>
Type Parameters:
DATA - supported processing data type.
All Implemented Interfaces:
ResponseProcessor.RespondingContext<DATA>

public class DefaultRespondingContext<DATA>
extends Object
implements ResponseProcessor.RespondingContext<DATA>

Default implementation of the request-scoped responding context.

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

Constructor Summary
DefaultRespondingContext()
           
 
Method Summary
 Stage<DATA> createResponderRoot()
          (Optionally) create a responder chain from all transformations previously pushed into the context.
 void push(ChainableStage<DATA> stage)
          Push chainable response transformation stage that should be applied.
 void push(com.google.common.base.Function<DATA,DATA> responseTransformation)
          Push response transformation function that should be applied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRespondingContext

public DefaultRespondingContext()
Method Detail

push

public void push(com.google.common.base.Function<DATA,DATA> responseTransformation)
Description copied from interface: ResponseProcessor.RespondingContext
Push response transformation function that should be applied.

Specified by:
push in interface ResponseProcessor.RespondingContext<DATA>
Parameters:
responseTransformation - response transformation function.

push

public void push(ChainableStage<DATA> stage)
Description copied from interface: ResponseProcessor.RespondingContext
Push chainable response transformation stage that should be applied.

Specified by:
push in interface ResponseProcessor.RespondingContext<DATA>
Parameters:
stage - response transformation chainable stage.

createResponderRoot

public Stage<DATA> createResponderRoot()
Description copied from interface: ResponseProcessor.RespondingContext
(Optionally) create a responder chain from all transformations previously pushed into the context.

Specified by:
createResponderRoot in interface ResponseProcessor.RespondingContext<DATA>
Returns:
created responder chain root or null in case of no registered transformations.


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