Package org.conscrypt

Class PeerInfoProvider


  • abstract class PeerInfoProvider
    extends java.lang.Object
    A provider for the peer host and port information.
    • Field Detail

      • NULL_PEER_INFO_PROVIDER

        private static final PeerInfoProvider NULL_PEER_INFO_PROVIDER
    • Constructor Detail

      • PeerInfoProvider

        PeerInfoProvider()
    • 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.
      • forHostAndPort

        static PeerInfoProvider forHostAndPort​(java.lang.String host,
                                               int port)