@ThreadSafe class ConnectionHolder extends java.lang.Object implements ConnectionReleaseTrigger, Cancellable, java.io.Closeable
| Constructor and Description |
|---|
ConnectionHolder(Log log,
HttpClientConnectionManager manager,
HttpClientConnection managedConn) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortConnection()
Releases the connection without the option of keep-alive.
|
boolean |
cancel() |
void |
close() |
boolean |
isReleased() |
boolean |
isReusable() |
void |
markNonReusable() |
void |
markReusable() |
void |
releaseConnection()
Releases the connection with the option of keep-alive.
|
void |
setState(java.lang.Object state) |
void |
setValidFor(long duration,
java.util.concurrent.TimeUnit tunit) |
public ConnectionHolder(Log log,
HttpClientConnectionManager manager,
HttpClientConnection managedConn)
public boolean isReusable()
public void markReusable()
public void markNonReusable()
public void setState(java.lang.Object state)
public void setValidFor(long duration,
java.util.concurrent.TimeUnit tunit)
public void releaseConnection()
ConnectionReleaseTriggerabortConnection for a hard release. The
connection may be reused as specified by the duration.releaseConnection in interface ConnectionReleaseTriggerpublic void abortConnection()
ConnectionReleaseTriggerConnectionReleaseTrigger.releaseConnection() for a graceful release.abortConnection in interface ConnectionReleaseTriggerpublic boolean cancel()
cancel in interface Cancellablepublic boolean isReleased()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException