public interface HttpConnection
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this connection gracefully.
|
HttpConnectionMetrics |
getMetrics()
Returns a collection of connection metrics.
|
int |
getSocketTimeout()
Returns the socket timeout value.
|
boolean |
isOpen()
Checks if this connection is open.
|
boolean |
isStale()
Checks whether this connection has gone down.
|
void |
setSocketTimeout(int timeout)
Sets the socket timeout value.
|
void |
shutdown()
Force-closes this connection.
|
void close()
throws java.io.IOException
shutdown instead.close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionboolean isOpen()
boolean isStale()
true if attempts to use this connection are
likely to succeed, or false if they are likely
to fail and this connection should be closedvoid setSocketTimeout(int timeout)
timeout - timeout value in millisecondsint getSocketTimeout()
0 if timeout is disabled or -1 if
timeout is undefined.void shutdown()
throws java.io.IOException
java.io.IOExceptionHttpConnectionMetrics getMetrics()