Package org.conscrypt
Class PeerInfoProvider
- java.lang.Object
-
- org.conscrypt.PeerInfoProvider
-
abstract class PeerInfoProvider extends java.lang.Object
A provider for the peer host and port information.
-
-
Field Summary
Fields Modifier and Type Field Description private static PeerInfoProvider
NULL_PEER_INFO_PROVIDER
-
Constructor Summary
Constructors Constructor Description PeerInfoProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static PeerInfoProvider
forHostAndPort(java.lang.String host, int port)
(package private) abstract java.lang.String
getHostname()
Returns the hostname supplied during engine/socket creation.(package private) abstract java.lang.String
getHostnameOrIP()
This method attempts to create a textual representation of the peer host or IP.(package private) abstract int
getPort()
Gets the port of the peer.(package private) static PeerInfoProvider
nullProvider()
-
-
-
Field Detail
-
NULL_PEER_INFO_PROVIDER
private static final PeerInfoProvider NULL_PEER_INFO_PROVIDER
-
-
Method Detail
-
getHostname
abstract java.lang.String getHostname()
Returns the hostname supplied during engine/socket creation. No DNS resolution is attempted before returning the hostname.
-
getHostnameOrIP
abstract java.lang.String getHostnameOrIP()
This method attempts to create a textual representation of the peer host or IP. Does not perform a reverse DNS lookup. This is typically used during session creation.
-
getPort
abstract int getPort()
Gets the port of the peer.
-
nullProvider
static PeerInfoProvider nullProvider()
-
forHostAndPort
static PeerInfoProvider forHostAndPort(java.lang.String host, int port)
-
-