public class RegistrationRequest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clazz |
private GridNodeConfiguration |
configuration |
private java.lang.String |
description |
static java.lang.String |
MAX_INSTANCES |
private java.lang.String |
name |
static java.lang.String |
PATH |
static java.lang.String |
SELENIUM_PROTOCOL |
Constructor and Description |
---|
RegistrationRequest()
Create a new registration request using the default values of a
GridNodeConfiguration |
RegistrationRequest(GridNodeConfiguration configuration)
Create a new registration request using the supplied
GridNodeConfiguration |
RegistrationRequest(GridNodeConfiguration configuration,
java.lang.String name)
Create a new registration request using the supplied
GridNodeConfiguration , and name |
RegistrationRequest(GridNodeConfiguration configuration,
java.lang.String name,
java.lang.String description)
Create a new registration request using the supplied
GridNodeConfiguration , name, and
description |
Modifier and Type | Method and Description |
---|---|
static RegistrationRequest |
build(GridNodeConfiguration configuration)
Build a RegistrationRequest from the provided
GridNodeConfiguration . |
static RegistrationRequest |
build(GridNodeConfiguration configuration,
java.lang.String name)
Build a RegistrationRequest from the provided
GridNodeConfiguration , use the provided name. |
static RegistrationRequest |
build(GridNodeConfiguration configuration,
java.lang.String name,
java.lang.String description)
Build a RegistrationRequest from the provided
GridNodeConfiguration , use the provided name
and description. |
private void |
fixUpCapabilities() |
private void |
fixUpHost() |
static RegistrationRequest |
fromJson(com.google.gson.JsonObject json)
Create an object from a registration request formatted as a JsonObject
|
static RegistrationRequest |
fromJson(java.lang.String json)
Create an object from a registration request formatted as a json string.
|
GridNodeConfiguration |
getConfiguration() |
java.lang.String |
getDescription() |
java.lang.String |
getName() |
com.google.gson.JsonObject |
toJson() |
void |
validate()
Validate the current setting and throw a config exception is an invalid setup is detected.
|
public static final java.lang.String MAX_INSTANCES
public static final java.lang.String SELENIUM_PROTOCOL
public static final java.lang.String PATH
private final java.lang.String clazz
private java.lang.String name
private java.lang.String description
private GridNodeConfiguration configuration
public RegistrationRequest()
GridNodeConfiguration
public RegistrationRequest(GridNodeConfiguration configuration)
GridNodeConfiguration
configuration
- the GridNodeConfiguration
to usepublic RegistrationRequest(GridNodeConfiguration configuration, java.lang.String name)
GridNodeConfiguration
, and nameconfiguration
- the GridNodeConfiguration
to usename
- the name for the remotepublic RegistrationRequest(GridNodeConfiguration configuration, java.lang.String name, java.lang.String description)
GridNodeConfiguration
, name, and
descriptionconfiguration
- the GridNodeConfiguration
to usename
- the name for the remotedescription
- the description for the remote hostpublic java.lang.String getName()
public java.lang.String getDescription()
public GridNodeConfiguration getConfiguration()
public com.google.gson.JsonObject toJson()
public static RegistrationRequest fromJson(com.google.gson.JsonObject json) throws com.google.gson.JsonSyntaxException
json
- JsonObjectcom.google.gson.JsonSyntaxException
public static RegistrationRequest fromJson(java.lang.String json) throws com.google.gson.JsonSyntaxException
json
- JSON Stringcom.google.gson.JsonSyntaxException
public static RegistrationRequest build(GridNodeConfiguration configuration)
GridNodeConfiguration
. This is different
than new RegistrationRequest(GridNodeConfiguration)
because it will merge the provided
configuration onto the GridNodeConfiguration.DEFAULT_NODE_CONFIG_FILE
and then "fixup"
the resulting RegistrationRequest before returning the resultconfiguration
- the GridNodeConfiguration
to usepublic static RegistrationRequest build(GridNodeConfiguration configuration, java.lang.String name)
GridNodeConfiguration
, use the provided name.
This is different than new RegistrationRequest(GridNodeConfiguration, String)
because it
will merge the provided configuration onto the GridNodeConfiguration.DEFAULT_NODE_CONFIG_FILE
and then "fixup" the resulting RegistrationRequest before returning the resultconfiguration
- the GridNodeConfiguration
to usename
- the name for the remotepublic static RegistrationRequest build(GridNodeConfiguration configuration, java.lang.String name, java.lang.String description)
GridNodeConfiguration
, use the provided name
and description. This is different than
new RegistrationRequest(GridNodeConfiguration, String, String)
because it will merge the
provided configuration onto the GridNodeConfiguration.DEFAULT_NODE_CONFIG_FILE
and then "fixup" the resulting RegistrationRequest before returning the resultconfiguration
- the GridNodeConfiguration
to usename
- the name for the remotedescription
- the description for the remote hostprivate void fixUpCapabilities()
private void fixUpHost()
public void validate() throws GridConfigurationException
GridConfigurationException
- grid configuration