Package org.conscrypt

Class PeerInfoProvider

java.lang.Object
org.conscrypt.PeerInfoProvider

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

    • NULL_PEER_INFO_PROVIDER

      private static final PeerInfoProvider NULL_PEER_INFO_PROVIDER
  • Constructor Details

    • PeerInfoProvider

      PeerInfoProvider()
  • Method Details

    • getHostname

      abstract String getHostname()
      Returns the hostname supplied during engine/socket creation. No DNS resolution is attempted before returning the hostname.
    • getHostnameOrIP

      abstract 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(String host, int port)