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.SocketAddresslocalAddressprivate java.net.SocketAddressremoteAddressprivate TimeoutsocketTimeout
-
Constructor Summary
Constructors Modifier Constructor Description protectedEndpointDetails(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.SocketAddressgetLocalAddress()abstract longgetReceivedBytesCount()Gets the number of bytes transferred over the connection, 0 if not available.java.net.SocketAddressgetRemoteAddress()abstract longgetRequestCount()Gets the number of requests transferred over the connection, 0 if not available.abstract longgetResponseCount()Gets the number of responses transferred over the connection, 0 if not available.abstract longgetSentBytesCount()Gets the number of bytes transferred over the connection, 0 if not available.TimeoutgetSocketTimeout()Gets the socket timeout.java.lang.StringtoString()
-
-
-
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:
getRequestCountin interfaceHttpConnectionMetrics
-
getResponseCount
public abstract long getResponseCount()
Gets the number of responses transferred over the connection, 0 if not available.- Specified by:
getResponseCountin interfaceHttpConnectionMetrics
-
getSentBytesCount
public abstract long getSentBytesCount()
Gets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getSentBytesCountin interfaceHttpConnectionMetrics
-
getReceivedBytesCount
public abstract long getReceivedBytesCount()
Gets the number of bytes transferred over the connection, 0 if not available.- Specified by:
getReceivedBytesCountin interfaceHttpConnectionMetrics
-
getSocketTimeout
public Timeout getSocketTimeout()
Gets the socket timeout.- Returns:
- the socket timeout.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-