public interface HttpConnection extends 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 IOException
shutdown
instead.close
in interface AutoCloseable
close
in interface Closeable
IOException
boolean 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 IOException
IOException
HttpConnectionMetrics getMetrics()
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.