Package org.zalando.riptide
Class NoopRoute
java.lang.Object
org.zalando.riptide.NoopRoute
- All Implemented Interfaces:
Route
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.springframework.http.client.ClientHttpResponse response, MessageReader reader) Executes this route against the specific response.static Routenoop()Produces aRoutethat ignores the response without actively discarding the response body.
-
Method Details
-
execute
public void execute(org.springframework.http.client.ClientHttpResponse response, MessageReader reader) Description copied from interface:RouteExecutes this route against the specific response. It's within the responsibility of arouteimplementation to ensure the stream is consumed (optional) and properly closed. A fully consumed response stream allows for connection reuse and is therefore highly encouraged. Making sure that every response is properly closed ensures that stale connections are not exhausting the connection pool. Mostrouteswill do both operations internally, but the responsibility can be handed over to the caller of therouteby unmarshalling the stream into aCloseableorAutoCloseablebean. -
noop
Produces aRoutethat ignores the response without actively discarding the response body. Beware that the returned response needs be closed manually in all cases, otherwise the bound connection may not be released back to the pool.- Returns:
- a
routethat doesn't execute any meaningful logic
-