public class DefaultConnectionNameGenerator extends Object implements ConnectionNameGenerator
ConnectionNameGenerator.
It generates a new name every time called, using the format specified by the Response Time Observability RFC.
| Modifier and Type | Field and Description |
|---|---|
static ConnectionNameGenerator |
INSTANCE
A connection name generator with a default User Agent string.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
name()
Generate the name for a DCP Connection.
|
String |
toString() |
public static final ConnectionNameGenerator INSTANCE
public static DefaultConnectionNameGenerator forProduct(String productName, String productVersion, String... comments)
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.public String name()
ConnectionNameGeneratorThe name must be no longer than 200 bytes when converted to UTF-8.
name in interface ConnectionNameGeneratorCopyright © 2021 Couchbase, Inc.. All rights reserved.