Class GerritSlave
java.lang.Object
hudson.model.AbstractDescribableImpl<GerritSlave>
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritSlave
- All Implemented Interfaces:
Describable<GerritSlave>
Represents a Gerrit slave after which we wait for replication events.
- Author:
- Mathieu Wang <mathieu.wang@ericsson.com>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Descriptor for a GerritSlave. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGerritSlave(String name, String host, int timeout) Create a new GerritSlave, a new id will be generated.GerritSlave(String id, String name, String host, int timeoutInSeconds) Standard Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic GerritSlavecreateGerritSlaveFromJSON(net.sf.json.JSONObject obj) Creates a GerritSlave from a JSONObject.getHost()Getter for host.getId()Getter for id.getName()Getter for name.intGetter for time-out.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
DISABLED_TIMEOUT_VALUE
public static final int DISABLED_TIMEOUT_VALUEDisabled timeout value.- See Also:
-
-
Constructor Details
-
GerritSlave
Standard Constructor.- Parameters:
id- the ID ornullto generate a new onename- the name to represent/identify this gerritSlavehost- the host for the gerritSlave, can include port(e.g. someHost:1234).timeoutInSeconds- maximum time we wait for a replication event.
-
GerritSlave
Create a new GerritSlave, a new id will be generated.- Parameters:
name- the name to represent/identify this gerritSlavehost- the host for the gerritSlave, can include port(e.g. someHost:1234).timeout- maximum time we wait for a replication event.
-
-
Method Details
-
getId
Getter for id.- Returns:
- the id
-
getName
Getter for name.- Returns:
- the name
-
getHost
Getter for host.- Returns:
- the host
-
getTimeoutInSeconds
public int getTimeoutInSeconds()Getter for time-out.- Returns:
- the time-out
-
createGerritSlaveFromJSON
Creates a GerritSlave from a JSONObject.- Parameters:
obj- the JSONObject.- Returns:
- a GerritSlave.
-