Class DefaultRespondingContext
- java.lang.Object
-
- org.glassfish.jersey.server.internal.process.DefaultRespondingContext
-
- All Implemented Interfaces:
RespondingContext
class DefaultRespondingContext extends java.lang.Object implements RespondingContext
Default implementation of the request-scopedresponding context
.
-
-
Field Summary
Fields Modifier and Type Field Description private Stage<ContainerResponse>
rootStage
-
Constructor Summary
Constructors Constructor Description DefaultRespondingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stage<ContainerResponse>
createRespondingRoot()
(Optionally) create a responder chain from all transformations previously pushed into the context.void
push(java.util.function.Function<ContainerResponse,ContainerResponse> responseTransformation)
Push response transformation function that should be applied.void
push(ChainableStage<ContainerResponse> stage)
Push chainable response transformation stage that should be applied.
-
-
-
Field Detail
-
rootStage
private Stage<ContainerResponse> rootStage
-
-
Method Detail
-
push
public void push(java.util.function.Function<ContainerResponse,ContainerResponse> responseTransformation)
Description copied from interface:RespondingContext
Push response transformation function that should be applied.- Specified by:
push
in interfaceRespondingContext
- Parameters:
responseTransformation
- response transformation function.
-
push
public void push(ChainableStage<ContainerResponse> stage)
Description copied from interface:RespondingContext
Push chainable response transformation stage that should be applied.- Specified by:
push
in interfaceRespondingContext
- Parameters:
stage
- response transformation chainable stage.
-
createRespondingRoot
public Stage<ContainerResponse> createRespondingRoot()
Description copied from interface:RespondingContext
(Optionally) create a responder chain from all transformations previously pushed into the context.- Specified by:
createRespondingRoot
in interfaceRespondingContext
- Returns:
- created responder chain root or
null
in case of no registered transformations.
-
-