|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.client.DefaultConnectionKeepAliveStrategy
public class DefaultConnectionKeepAliveStrategy
Default implementation of a strategy deciding duration that a connection can remain idle. The default implementation looks solely at the 'Keep-Alive' header's timeout token.
Constructor Summary | |
---|---|
DefaultConnectionKeepAliveStrategy()
|
Method Summary | |
---|---|
long |
getKeepAliveDuration(org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
Returns the duration of time which this connection can be safely kept idle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultConnectionKeepAliveStrategy()
Method Detail |
---|
public long getKeepAliveDuration(org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)
ConnectionKeepAliveStrategy
ConnectionReuseStrategy
, if
{@link 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 impact
getKeepAliveDuration
in interface ConnectionKeepAliveStrategy
response
- The last response received over the connection.context
- the context in which the connection is being used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |