class DefaultRespondingContext extends java.lang.Object implements RespondingContext
responding context.| Modifier and Type | Field and Description |
|---|---|
private Stage<ContainerResponse> |
rootStage |
| Constructor and Description |
|---|
DefaultRespondingContext() |
| Modifier and Type | Method and Description |
|---|---|
Stage<ContainerResponse> |
createRespondingRoot()
(Optionally) create a responder chain from all transformations
previously pushed into the context.
|
void |
push(ChainableStage<ContainerResponse> stage)
Push chainable response transformation stage that should be applied.
|
void |
push(com.google.common.base.Function<ContainerResponse,ContainerResponse> responseTransformation)
Push response transformation function that should be applied.
|
private Stage<ContainerResponse> rootStage
public void push(com.google.common.base.Function<ContainerResponse,ContainerResponse> responseTransformation)
RespondingContextpush in interface RespondingContextresponseTransformation - response transformation function.public void push(ChainableStage<ContainerResponse> stage)
RespondingContextpush in interface RespondingContextstage - response transformation chainable stage.public Stage<ContainerResponse> createRespondingRoot()
RespondingContextcreateRespondingRoot in interface RespondingContextnull in case of no
registered transformations.