public class ConfClient extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENDPOINT
The default value for the endpoint preference.
|
protected static String |
ENV_ENDPOINT_VAR
Environment variable to override the endpoint (e.g, for automatted
tests).
|
static String |
EXPECTED_API_VERSION |
static String |
PREF_ENDPOINT
The preference string for the configuration endpoint
|
static String |
REAL_DEFAULT_ENDPOINT
The default value for the endpoint preference that is actually used.
|
Modifier and Type | Method and Description |
---|---|
static void |
addApiChangedListener(Listener l) |
static String |
computePreferredEndpoint()
Returns the preferred EPR for the configuration service.
|
String |
getEndpoint()
The EndPoint currently in use.
|
static ConfClient |
getInstance() |
String |
getValue(String key)
Returns the value for the given configuration variable
|
String |
getValue(String key,
Boolean force)
Deprecated.
|
protected void |
notifyApiChangedListeners(Event event) |
void |
refresh() |
static void |
removeApiChangedListener(Listener l) |
static void |
setProxySelector() |
public static String EXPECTED_API_VERSION
public static final String PREF_ENDPOINT
public static final String DEFAULT_ENDPOINT
public static final String REAL_DEFAULT_ENDPOINT
protected static final String ENV_ENDPOINT_VAR
DEFAULT_ENDPOINT
will be ignored.public static String computePreferredEndpoint()
public String getEndpoint()
""
if not yet
determined.public static ConfClient getInstance() throws OfflineException
OfflineException
public String getValue(String key) throws OfflineException
key
- the variable name, see
ConfservClientConstants
OfflineException
@Deprecated public String getValue(String key, Boolean force) throws OfflineException
key
- the variable name, see
ConfservClientConstants
force
- if true, the value is retrieved from the server, otherwise we
may use a cached valueOfflineException
public void refresh() throws OfflineException
OfflineException
public static void addApiChangedListener(Listener l)
public static void removeApiChangedListener(Listener l)
protected void notifyApiChangedListeners(Event event)
public static void setProxySelector()