Package org.topbraidlive.client.java
Class ClientConfiguration
- java.lang.Object
-
- org.topbraidlive.client.java.ClientConfiguration
-
public final class ClientConfiguration extends Object
Immutable client configuration object.Instances can be created with a constructor or by using the builder pattern (builder()).
Validates on construction rather than in builder setters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClientConfiguration.Builder
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_PREFIXThe prefix for configuration keys that come from a global namespace, such as system properties or environment variables.static ClientConfigurationLOCALHOST_TESTstatic ClientConfigurationTBC
-
Constructor Summary
Constructors Constructor Description ClientConfiguration()Construct a configuration by reading it from the environment.ClientConfiguration(org.apache.commons.configuration2.Configuration configuration)Construct a configuration by reading it from a commons-configuration Configuration instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientConfiguration.Builderbuilder()booleanequals(Object o)ClientAuthenticationMethodgetAuthenticationMethod()Get the authentication method the client should use.ClientCredentialsgetCredentials()Get the credentials the client should use.StringgetServerBaseUrl()Get the server base URL.inthashCode()StringtoString()
-
-
-
Field Detail
-
KEY_PREFIX
public static final String KEY_PREFIX
The prefix for configuration keys that come from a global namespace, such as system properties or environment variables. With this prefix the property "foo" is specified as "edg.client.foo".- See Also:
- Constant Field Values
-
LOCALHOST_TEST
public static final ClientConfiguration LOCALHOST_TEST
-
TBC
public static final ClientConfiguration TBC
-
-
Constructor Detail
-
ClientConfiguration
public ClientConfiguration()
Construct a configuration by reading it from the environment.
-
ClientConfiguration
public ClientConfiguration(org.apache.commons.configuration2.Configuration configuration)
Construct a configuration by reading it from a commons-configuration Configuration instance.
-
-
Method Detail
-
builder
public static final ClientConfiguration.Builder builder()
-
getAuthenticationMethod
public final ClientAuthenticationMethod getAuthenticationMethod()
Get the authentication method the client should use.
-
getCredentials
public final ClientCredentials getCredentials()
Get the credentials the client should use.
-
getServerBaseUrl
public final String getServerBaseUrl()
Get the server base URL. It is guaranteed to be properly formed and end with a / e.g., http://localhost:8080/.
-
-