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 |
java.lang.String |
host
Hostname or IP to use.
|
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.
|
Constructor and Description |
---|
StandaloneConfiguration()
Creates a new configuration using the default values.
|
StandaloneConfiguration(CommonJsonConfiguration jsonConfig) |
StandaloneConfiguration(StandaloneCliOptions cliConfig) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<org.openqa.selenium.json.TypeCoercer<?>> |
getCoercers() |
protected boolean |
isMergeAble(java.lang.Class<?> targetType,
java.lang.Object other,
java.lang.Object target)
Determines if one object can be merged onto another object.
|
static <T extends StandaloneConfiguration> |
loadFromJson(org.openqa.selenium.json.JsonInput jsonInput,
java.lang.Class<T> type) |
static <T extends StandaloneConfiguration> |
loadFromJson(java.lang.String resource,
java.lang.Class<T> type) |
protected static org.openqa.selenium.json.JsonInput |
loadJsonFromResourceOrFile(java.lang.String resource)
load a JSON file from the resource or file system.
|
void |
merge(StandaloneConfiguration other)
copy another configuration's values into this one if they are set.
|
protected void |
serializeFields(java.util.Map<java.lang.String,java.lang.Object> appendTo) |
java.util.Map<java.lang.String,java.lang.Object> |
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 java.lang.Integer browserTimeout
public java.lang.Boolean debug
LogLevel.FINE
log messages. Default false
.public java.lang.Integer jettyMaxThreads
null
.public java.lang.String log
null
.public java.lang.String host
null
. Automatically determined when null
.public java.lang.Integer port
public java.lang.String role
public java.lang.Integer timeout
public StandaloneConfiguration()
public StandaloneConfiguration(CommonJsonConfiguration jsonConfig)
public StandaloneConfiguration(StandaloneCliOptions cliConfig)
public static <T extends StandaloneConfiguration> T loadFromJson(java.lang.String resource, java.lang.Class<T> type)
public static <T extends StandaloneConfiguration> T loadFromJson(org.openqa.selenium.json.JsonInput jsonInput, java.lang.Class<T> type)
protected java.util.Collection<org.openqa.selenium.json.TypeCoercer<?>> getCoercers()
public void merge(StandaloneConfiguration other)
protected boolean isMergeAble(java.lang.Class<?> targetType, java.lang.Object other, java.lang.Object target)
null
,
and empty (Collections & Maps) to make decision.targetType
- The type that both other
and target
must be assignable to.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 java.util.Map<java.lang.String,java.lang.Object> toJson()
protected void serializeFields(java.util.Map<java.lang.String,java.lang.Object> appendTo)
protected static org.openqa.selenium.json.JsonInput loadJsonFromResourceOrFile(java.lang.String resource)
resource
as a
JSON string to be parsed.resource
- file or jar resource location