Enum Class PortSelector

java.lang.Object
java.lang.Enum<PortSelector>
com.couchbase.client.dcp.core.config.PortSelector
All Implemented Interfaces:
Serializable, Comparable<PortSelector>, java.lang.constant.Constable

public enum PortSelector extends Enum<PortSelector>
Helps the config parser select only the service ports relevant to the client's transport security mode (TLS or non-TLS).
  • Enum Constant Details

  • Method Details

    • values

      public static PortSelector[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PortSelector valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getServiceForName

      public Optional<ServiceType> getServiceForName(String serviceName)
      Given the name of a Couchbase service as it appears in the global/bucket config JSON, return the associated ServiceType, or empty if the name is unrecognized or refers to an irrelevant transport. For example, TLS only recognizes service names that use a secure transport.