Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the connection is allowed to be reused, or
false if it MUST NOT be reusedThe last request transmitted over that connection. request, HttpResponse The last response transmitted over that connection. response, HttpContext the context in which the connection is being
used. context)Decides whether a connection can be kept open after a request. |
| keepAlive | back to summary |
|---|---|
| public boolean keepAlive(HttpRequest request, HttpResponse response, HttpContext context) Decides whether a connection can be kept open after a request.
If this method returns One can use the HTTP context to retrieve additional objects that may be relevant for the keep-alive strategy: the actual HTTP connection, the original HTTP request, target host if known, number of times the connection has been reused already and so on.
If the connection is already closed,
| |