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.voidpush(java.util.function.Function<ContainerResponse,ContainerResponse> responseTransformation)Push response transformation function that should be applied.voidpush(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:RespondingContextPush response transformation function that should be applied.- Specified by:
pushin interfaceRespondingContext- Parameters:
responseTransformation- response transformation function.
-
push
public void push(ChainableStage<ContainerResponse> stage)
Description copied from interface:RespondingContextPush chainable response transformation stage that should be applied.- Specified by:
pushin 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:
createRespondingRootin interfaceRespondingContext- Returns:
- created responder chain root or
nullin case of no registered transformations.
-
-