Package com.couchbase.client.dcp
Class DefaultConnectionNameGenerator
java.lang.Object
com.couchbase.client.dcp.DefaultConnectionNameGenerator
- All Implemented Interfaces:
ConnectionNameGenerator
The default implementation for the
ConnectionNameGenerator.
It generates a new name every time called, using the format specified by the Response Time Observability RFC.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConnectionNameGeneratorA connection name generator with a default User Agent string.Fields inherited from interface com.couchbase.client.dcp.ConnectionNameGenerator
CONNECTION_NAME_MAX_UTF8_BYTES -
Method Summary
-
Field Details
-
INSTANCE
A connection name generator with a default User Agent string.
-
-
Method Details
-
forProduct
public static DefaultConnectionNameGenerator forProduct(String productName, String productVersion, String... comments) Returns a new connection name generator that includes the given product information in the User Agent string.- Parameters:
productName- Product name to include in the User Agent string.productVersion- Optional product version to include in the User Agent string. May be null.comments- Optional comments to include in the User Agent string.
-
name
Description copied from interface:ConnectionNameGeneratorGenerates the name for a DCP Connection.The UTF-8 encoding of the name must be no longer than 200 bytes.
- Specified by:
namein interfaceConnectionNameGenerator
-
toString
-