public class BHttpConnectionBase extends Object implements HttpConnection, HttpInetConnection
HttpConnection implementations and provides
functionality common to both client and server HTTP connections.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this connection gracefully.
|
InetAddress |
getLocalAddress() |
int |
getLocalPort() |
HttpConnectionMetrics |
getMetrics()
Returns a collection of connection metrics.
|
InetAddress |
getRemoteAddress() |
int |
getRemotePort() |
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.
|
String |
toString() |
public boolean isOpen()
HttpConnectionisOpen in interface HttpConnectionpublic InetAddress getLocalAddress()
getLocalAddress in interface HttpInetConnectionpublic int getLocalPort()
getLocalPort in interface HttpInetConnectionpublic InetAddress getRemoteAddress()
getRemoteAddress in interface HttpInetConnectionpublic int getRemotePort()
getRemotePort in interface HttpInetConnectionpublic void setSocketTimeout(int timeout)
HttpConnectionsetSocketTimeout in interface HttpConnectiontimeout - timeout value in millisecondspublic int getSocketTimeout()
HttpConnectiongetSocketTimeout in interface HttpConnection0 if timeout is disabled or -1 if
timeout is undefined.public void shutdown()
throws IOException
HttpConnectionshutdown in interface HttpConnectionIOExceptionpublic void close()
throws IOException
HttpConnectionshutdown instead.close in interface Closeableclose in interface AutoCloseableclose in interface HttpConnectionIOExceptionpublic boolean isStale()
HttpConnectionisStale in interface HttpConnectiontrue if attempts to use this connection are
likely to succeed, or false if they are likely
to fail and this connection should be closedpublic HttpConnectionMetrics getMetrics()
HttpConnectiongetMetrics in interface HttpConnectionCopyright © 2010 - 2020 Adobe. All Rights Reserved