Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public interface

ConnectionReleaseTrigger

org.apache.http.conn.ConnectionReleaseTrigger
Known Indirect Subclasses

Class Overview

Interface for releasing a connection. This can be implemented by various "trigger" objects which are associated with a connection, for example a stream or an entity or the connection itself.
The methods in this interface can safely be called multiple times. The first invocation releases the connection, subsequent calls are ignored.

Summary

Public Methods
abstract void abortConnection ()
Releases the connection without the option of keep-alive.
abstract void releaseConnection ()
Releases the connection with the option of keep-alive.

Public Methods

public abstract void abortConnection ()

Added in API level 1

Releases the connection without the option of keep-alive. This is a "hard" release that implies a shutdown of the connection. Use releaseConnection for a graceful release.

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

public abstract void releaseConnection ()

Added in API level 1

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 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.