| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.springframework.http.client.ClientHttpResponse response,
MessageReader reader)
Executes this route against the specific response.
|
static Route |
noop()
Produces a
Route that ignores the response without actively
discarding the response body. |
public void execute(org.springframework.http.client.ClientHttpResponse response,
MessageReader reader)
Routeroute
implementation 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.
Most routes will do both operations internally, but the responsibility can be handed over to the
caller of the route by unmarshalling the stream into a Closeable or
AutoCloseable bean.public static Route noop()
Route that 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.route that doesn't execute any meaningful logicCopyright © 2015–2020 Zalando SE. All rights reserved.