org.apache.http.impl
Class DefaultConnectionReuseStrategy

java.lang.Object
  extended by org.apache.http.impl.DefaultConnectionReuseStrategy
All Implemented Interfaces:
ConnectionReuseStrategy

public class DefaultConnectionReuseStrategy
extends java.lang.Object
implements ConnectionReuseStrategy

Default implementation of a strategy deciding about connection re-use.

Since:
4.0
Version:
$Revision: 376961 $
Author:
Oleg Kalnichevski

Constructor Summary
DefaultConnectionReuseStrategy()
           
 
Method Summary
 boolean keepAlive(HttpResponse response)
          Tells if the connection used to receive a response should be closed or kept open.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConnectionReuseStrategy

public DefaultConnectionReuseStrategy()
Method Detail

keepAlive

public boolean keepAlive(HttpResponse response)
Description copied from interface: ConnectionReuseStrategy
Tells if the connection used to receive a response should be closed or kept open. Http processors should close the physical connection if this method returns false. They should do their best to keep it open if this method returns true.

Specified by:
keepAlive in interface ConnectionReuseStrategy
Parameters:
response - The response whose connection is concerned.
Returns:
true if the connection is to be kept open, false if it is to be closed.


Copyright 2005-2005-2006 Apache Software Foundation. All Rights Reserved.