public class StandaloneConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.Integer |
browserTimeout
Browser timeout.
|
java.lang.Boolean |
debug
Enable
LogLevel.FINE log messages. |
static java.lang.String |
DEFAULT_STANDALONE_CONFIG_FILE |
boolean |
enablePassThrough
Whether or not to use experimental passthrough mode on a hub or a standalone
|
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
public boolean version
@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
@Expose public boolean enablePassThrough
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)