Payload - Type of payload this transformer receives.public class StatelessTrailersTransformer<Payload> extends Object implements TrailersTransformer<Void,Payload>
TrailersTransformer that does not require any state.| Constructor and Description |
|---|
StatelessTrailersTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected Payload |
accept(Payload payload)
Same as
accept(Void, Object) but without the state. |
Payload |
accept(Void __,
Payload payload)
Accepts a
Payload. |
HttpHeaders |
catchPayloadFailure(Void __,
Throwable cause,
HttpHeaders trailers)
Invoked once all
Payload instances are accepted and the payload stream
has terminated with an error. |
Void |
newState()
Creates a new instance of the
State. |
protected HttpHeaders |
payloadComplete(HttpHeaders trailers)
Same as
payloadComplete(Void, HttpHeaders) but without the state. |
HttpHeaders |
payloadComplete(Void __,
HttpHeaders trailers)
Invoked once all
Payload instances are accepted and the payload stream
has successfully completed. |
protected HttpHeaders |
payloadFailed(Throwable cause,
HttpHeaders trailers)
Same as
catchPayloadFailure(Void, Throwable, HttpHeaders) but without the state. |
public final Void newState()
TrailersTransformerState.newState in interface TrailersTransformer<Void,Payload>State.public final Payload accept(Void __, Payload payload)
TrailersTransformerPayload.accept in interface TrailersTransformer<Void,Payload>__ - State instance created previously by this transformer.payload - Payload to accept.Payload instance.public final HttpHeaders payloadComplete(Void __, HttpHeaders trailers)
TrailersTransformerPayload instances are accepted and the payload stream
has successfully completed.payloadComplete in interface TrailersTransformer<Void,Payload>__ - State instance created previously by this transformer.trailers - Trailer for the streaming HTTP request/response that is transformed.public final HttpHeaders catchPayloadFailure(Void __, Throwable cause, HttpHeaders trailers) throws Throwable
TrailersTransformerPayload instances are accepted and the payload stream
has terminated with an error.
This method suppresses the passed cause if it returns successfully. In order to propagate the
cause, one should throw the same from this method.
catchPayloadFailure in interface TrailersTransformer<Void,Payload>__ - State instance created previously by this transformer.cause - of the payload stream failure.trailers - Trailer for the streaming HTTP request/response that is transformed.cause. In order to
propagate the cause, it should be re-thrown.Throwable - If the error has to be propagatedprotected Payload accept(Payload payload)
accept(Void, Object) but without the state.payload - Payload to accept.Payload instance.protected HttpHeaders payloadComplete(HttpHeaders trailers)
payloadComplete(Void, HttpHeaders) but without the state.trailers - Trailer for the streaming HTTP request/response that is transformed.protected HttpHeaders payloadFailed(Throwable cause, HttpHeaders trailers) throws Throwable
catchPayloadFailure(Void, Throwable, HttpHeaders) but without the state.cause - of the payload stream failure.trailers - Trailer for the streaming HTTP request/response that is transformed.cause. In order to
propagate the cause, it should be re-thrown.Throwable - If the error has to be propagated