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)
RespondingContext
push
in interface RespondingContext
responseTransformation
- response transformation function.public void push(ChainableStage<ContainerResponse> stage)
RespondingContext
push
in interface RespondingContext
stage
- response transformation chainable stage.public Stage<ContainerResponse> createRespondingRoot()
RespondingContext
createRespondingRoot
in interface RespondingContext
null
in case of no
registered transformations.