public static class HeaderFilter.Composite extends Object implements HeaderFilter
The order that the filters are applied are forward for headers being sent over the wire, and in reverse for headers that are received from the wire.
HeaderFilter.Composite
NONE
Constructor and Description |
---|
Composite(org.pcollections.PSequence<HeaderFilter> headerFilters) |
Modifier and Type | Method and Description |
---|---|
RequestHeader |
transformClientRequest(RequestHeader request)
Transform the given client request.
|
ResponseHeader |
transformClientResponse(ResponseHeader response,
RequestHeader request)
Transform the given client response.
|
RequestHeader |
transformServerRequest(RequestHeader request)
Transform the given server request.
|
ResponseHeader |
transformServerResponse(ResponseHeader response,
RequestHeader request)
Transform the given server response.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
composite
public Composite(org.pcollections.PSequence<HeaderFilter> headerFilters)
public RequestHeader transformClientRequest(RequestHeader request)
HeaderFilter
This will be invoked on all requests outgoing from the client.
transformClientRequest
in interface HeaderFilter
request
- The client request header.public RequestHeader transformServerRequest(RequestHeader request)
HeaderFilter
This will be invoked on all requests incoming to the server.
transformServerRequest
in interface HeaderFilter
request
- The server request header.public ResponseHeader transformServerResponse(ResponseHeader response, RequestHeader request)
HeaderFilter
This will be invoked on all responses outgoing from the server.
transformServerResponse
in interface HeaderFilter
response
- The server response.request
- The transformed server request. Useful for when the response transformation
requires information from the client.public ResponseHeader transformClientResponse(ResponseHeader response, RequestHeader request)
HeaderFilter
This will be invoked on all responses incoming to the client.
transformClientResponse
in interface HeaderFilter
response
- The client response.request
- The client request. Useful for when the response transformation requires
information from the client request.