public class StandaloneConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
avoidProxy |
private boolean |
browserSideLog |
java.lang.Integer |
browserTimeout
Browser timeout.
|
private boolean |
captureLogsOnQuit |
java.lang.Boolean |
debug
Enable
LogLevel.FINE log messages. |
(package private) static java.lang.Integer |
DEFAULT_BROWSER_TIMEOUT
Default browser timeout
|
(package private) static java.lang.Boolean |
DEFAULT_DEBUG_TOGGLE
Default state of LogeLevel.FINE log output toggle
|
(package private) static java.lang.Integer |
DEFAULT_PORT
Default standalone port
|
(package private) static java.lang.String |
DEFAULT_ROLE
Default standalone role
|
static java.lang.String |
DEFAULT_STANDALONE_CONFIG_FILE |
(package private) static java.lang.Integer |
DEFAULT_TIMEOUT
Default client timeout
|
boolean |
help |
java.lang.Integer |
jettyMaxThreads
Max threads for Jetty.
|
java.lang.String |
log
Filename to use for logging.
|
java.lang.Integer |
port
Port to bind to.
|
java.lang.String |
role
Server role.
|
java.lang.Integer |
timeout
Client timeout.
|
boolean |
version |
Constructor and Description |
---|
StandaloneConfiguration()
Creates a new configuration using the default values.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addJsonTypeAdapter(com.google.gson.GsonBuilder builder) |
protected boolean |
isMergeAble(java.lang.Object other,
java.lang.Object target)
Determines if one object can be merged onto another object.
|
static StandaloneConfiguration |
loadFromJSON(com.google.gson.JsonObject json) |
static StandaloneConfiguration |
loadFromJSON(java.lang.String filePath) |
void |
merge(StandaloneConfiguration other)
copy another configuration's values into this one if they are set.
|
com.google.gson.JsonElement |
toJson()
Return a JsonElement representation of the configuration.
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String format) |
java.lang.StringBuilder |
toString(java.lang.String format,
java.lang.String name,
java.lang.Object value) |
public static final java.lang.String DEFAULT_STANDALONE_CONFIG_FILE
static final java.lang.Integer DEFAULT_TIMEOUT
static final java.lang.Integer DEFAULT_BROWSER_TIMEOUT
static final java.lang.String DEFAULT_ROLE
static final java.lang.Integer DEFAULT_PORT
static final java.lang.Boolean DEFAULT_DEBUG_TOGGLE
public boolean version
@Expose(serialize=false) private boolean avoidProxy
@Expose(serialize=false) private boolean browserSideLog
@Expose(serialize=false) private boolean captureLogsOnQuit
@Expose(serialize=false) public boolean help
@Expose public java.lang.Integer browserTimeout
@Expose public java.lang.Boolean debug
LogLevel.FINE
log messages. Default false
.@Expose public java.lang.Integer jettyMaxThreads
null
.@Expose public java.lang.String log
null
.@Expose public java.lang.Integer port
@Expose public java.lang.String role
@Expose public java.lang.Integer timeout
public StandaloneConfiguration()
public static StandaloneConfiguration loadFromJSON(java.lang.String filePath)
filePath
- node config json file to load configuration frompublic static StandaloneConfiguration loadFromJSON(com.google.gson.JsonObject json)
json
- JsonObject to load configuration frompublic void merge(StandaloneConfiguration other)
other
- protected boolean isMergeAble(java.lang.Object other, java.lang.Object target)
null
,
and empty (Collections & Maps) to make decision.other
- the object to merge. must be the same type as the 'target'target
- the object to merge on to. must be the same type as the 'other'public java.lang.String toString(java.lang.String format)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.StringBuilder toString(java.lang.String format, java.lang.String name, java.lang.Object value)
public com.google.gson.JsonElement toJson()
protected void addJsonTypeAdapter(com.google.gson.GsonBuilder builder)