Package org.apache.hc.core5.http
Class EndpointDetails
- java.lang.Object
-
- org.apache.hc.core5.http.EndpointDetails
-
- All Implemented Interfaces:
HttpConnectionMetrics
- Direct Known Subclasses:
BasicEndpointDetails
public abstract class EndpointDetails extends java.lang.Object implements HttpConnectionMetrics
HTTP connection endpoint details.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.net.SocketAddress
localAddress
private java.net.SocketAddress
remoteAddress
private Timeout
socketTimeout
-
Constructor Summary
Constructors Modifier Constructor Description protected
EndpointDetails(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, Timeout socketTimeout)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.net.SocketAddress
getLocalAddress()
abstract long
getReceivedBytesCount()
Gets the number of bytes transferred over the connection, 0 if not available.java.net.SocketAddress
getRemoteAddress()
abstract long
getRequestCount()
Gets the number of requests transferred over the connection, 0 if not available.abstract long
getResponseCount()
Gets the number of responses transferred over the connection, 0 if not available.abstract long
getSentBytesCount()
Gets the number of bytes transferred over the connection, 0 if not available.Timeout
getSocketTimeout()
Gets the socket timeout.java.lang.String
toString()
-
-
-
Field Detail
-
remoteAddress
private final java.net.SocketAddress remoteAddress
-
localAddress
private final java.net.SocketAddress localAddress
-
socketTimeout
private final Timeout socketTimeout
-
-
Constructor Detail
-
EndpointDetails
protected EndpointDetails(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, Timeout socketTimeout)
-
-
Method Detail
-
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
-
getLocalAddress
public java.net.SocketAddress getLocalAddress()
-
getRequestCount
public abstract long getRequestCount()
Gets the number of requests transferred over the connection, 0 if not available.- Specified by:
getRequestCount
in interfaceHttpConnectionMetrics
-
getResponseCount
public abstract long getResponseCount()
Gets the number of responses transferred over the connection, 0 if not available.- Specified by:
getResponseCount
in interfaceHttpConnectionMetrics
-
getSentBytesCount
public abstract long getSentBytesCount()
Gets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getSentBytesCount
in interfaceHttpConnectionMetrics
-
getReceivedBytesCount
public abstract long getReceivedBytesCount()
Gets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getReceivedBytesCount
in interfaceHttpConnectionMetrics
-
getSocketTimeout
public Timeout getSocketTimeout()
Gets the socket timeout.- Returns:
- the socket timeout.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-