FileDocCategorySizeDatePackage
ConnectionReleaseTrigger.javaAPI DocAndroid 1.5 API3188Wed May 06 22:41:10 BST 2009org.apache.http.conn

ConnectionReleaseTrigger

public interface ConnectionReleaseTrigger
Interface for releasing a connection. This can be implemented by various "trigger" objects which are associated with a connection, for example a {@link EofSensorInputStream stream} or an {@link BasicManagedEntity entity} or the {@link ManagedClientConnection connection} itself.
The methods in this interface can safely be called multiple times. The first invocation releases the connection, subsequent calls are ignored.
author
Roland Weber
version
$Revision: 672367 $
since
4.0

Fields Summary
Constructors Summary
Methods Summary
public voidabortConnection()
Releases the connection without the option of keep-alive. This is a "hard" release that implies a shutdown of the connection. Use {@link #releaseConnection releaseConnection} for a graceful release.

throws
IOException in case of an IO problem. The connection will be released anyway.

public voidreleaseConnection()
Releases the connection with the option of keep-alive. This is a "graceful" release and may cause IO operations for consuming the remainder of a response entity. Use {@link #abortConnection abortConnection} for a hard release. The connection may be reused as specified by the duration.

throws
IOException in case of an IO problem. The connection will be released anyway.