Package com.mongodb

Class KmsConnectContext

java.lang.Object
com.mongodb.KmsConnectContext

@Immutable public final class KmsConnectContext extends Object
The details of a Key Management Service (KMS) connection that a KmsConnectCallback is asked to establish.
Since:
5.11
See Also:
  • Constructor Details

    • KmsConnectContext

      public KmsConnectContext(String host, int port)
      Construct a new instance.
      Parameters:
      host - the host name of the KMS host, which may not be null
      port - the port of the KMS host, which must be positive
  • Method Details

    • getHost

      public String getHost()
      Gets the host name of the KMS host that the connection must ultimately reach.

      This is not the host name of any intermediary such as a proxy. It is the host that the driver negotiates TLS with once the callback returns.

      Returns:
      the host name of the KMS host, never null
    • getPort

      public int getPort()
      Gets the port of the KMS host that the connection must ultimately reach.

      This is not the port of any intermediary such as a proxy.

      Returns:
      the port of the KMS host, always positive
    • toString

      public String toString()
      Overrides:
      toString in class Object