public abstract class StandardEndpoints
extends java.lang.Object
This class is for internal LaunchDarkly SDK use only. It is public only because it needs to be accessible to SDK code in different packages. It is not part of the public supported API and should not be referenced by application code. This class is subject to change without notice.
| Modifier and Type | Field and Description |
|---|---|
static java.net.URI |
DEFAULT_EVENTS_BASE_URI |
static java.net.URI |
DEFAULT_POLLING_BASE_URI |
static java.net.URI |
DEFAULT_STREAMING_BASE_URI |
static java.lang.String |
FDV2_POLLING_REQUEST_PATH |
static java.lang.String |
FDV2_STREAMING_REQUEST_PATH |
static java.lang.String |
POLLING_REQUEST_PATH |
static java.lang.String |
STREAMING_REQUEST_PATH |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isCustomBaseUri(java.net.URI serviceEndpointsValue,
java.net.URI defaultValue)
Internal method to determine whether a given base URI was set to a custom value or not.
|
static java.net.URI |
selectBaseUri(java.net.URI serviceEndpointsValue,
java.net.URI defaultValue,
java.lang.String description,
LDLogger logger)
Internal method to decide which URI a given component should connect to.
|
public static final java.net.URI DEFAULT_STREAMING_BASE_URI
public static final java.net.URI DEFAULT_POLLING_BASE_URI
public static final java.net.URI DEFAULT_EVENTS_BASE_URI
public static final java.lang.String STREAMING_REQUEST_PATH
public static final java.lang.String POLLING_REQUEST_PATH
public static final java.lang.String FDV2_POLLING_REQUEST_PATH
public static final java.lang.String FDV2_STREAMING_REQUEST_PATH
public static java.net.URI selectBaseUri(java.net.URI serviceEndpointsValue,
java.net.URI defaultValue,
java.lang.String description,
LDLogger logger)
Always returns some URI, falling back on the default if necessary, but logs a warning if we detect that the application set some custom endpoints but not this one.
serviceEndpointsValue - the value set in ServiceEndpoints (this is either the default URI, a custom URI, or null)defaultValue - the constant default URI value defined in StandardEndpointsdescription - a human-readable string for the type of endpoint being selected, for logging purposeslogger - the logger to which we should print the warning, if neededpublic static boolean isCustomBaseUri(java.net.URI serviceEndpointsValue,
java.net.URI defaultValue)
This boolean value is only used for our diagnostic events. We only check if the value differs from the default; if the base URI was "overridden" in configuration, but happens to be equal to the default URI, we don't count that as custom for the purposes of this diagnostic.
serviceEndpointsValue - the value set in ServiceEndpointsdefaultValue - the constant default URI value defined in StandardEndpoints