@Immutable public class DefaultConnectionKeepAliveStrategy extends Object implements ConnectionKeepAliveStrategy
Constructor and Description |
---|
DefaultConnectionKeepAliveStrategy() |
Modifier and Type | Method and Description |
---|---|
long |
getKeepAliveDuration(HttpResponse response,
HttpContext context)
Returns the duration of time which this connection can be safely kept
idle.
|
public long getKeepAliveDuration(HttpResponse response, HttpContext context)
ConnectionKeepAliveStrategy
ConnectionReuseStrategy
, if
ConnectionReuseStrategy.keepAlive(HttpResponse, HttpContext)
returns true, this allows you to control how long the reuse will last. If
keepAlive returns false, this should have no meaningful impactgetKeepAliveDuration
in interface ConnectionKeepAliveStrategy
response
- The last response received over the connection.context
- the context in which the connection is being used.Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.