Class GerritSlave
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<GerritSlave>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritSlave
-
- All Implemented Interfaces:
Describable<GerritSlave>
public class GerritSlave extends AbstractDescribableImpl<GerritSlave>
Represents a Gerrit slave after which we wait for replication events.- Author:
- Mathieu Wang <mathieu.wang@ericsson.com>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GerritSlave.GerritSlaveDescriptor
The Descriptor for a GerritSlave.
-
Field Summary
Fields Modifier and Type Field Description static int
DISABLED_TIMEOUT_VALUE
Disabled timeout value.
-
Constructor Summary
Constructors Constructor Description GerritSlave(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GerritSlave
createGerritSlaveFromJSON(net.sf.json.JSONObject obj)
Creates a GerritSlave from a JSONObject.String
getHost()
Getter for host.String
getId()
Getter for id.String
getName()
Getter for name.int
getTimeoutInSeconds()
Getter for time-out.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Field Detail
-
DISABLED_TIMEOUT_VALUE
public static final int DISABLED_TIMEOUT_VALUE
Disabled timeout value.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GerritSlave
@DataBoundConstructor public GerritSlave(String id, String name, String host, int timeoutInSeconds)
Standard Constructor.- Parameters:
id
- the ID ornull
to 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
public GerritSlave(String name, String host, int timeout)
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 Detail
-
getId
public String getId()
Getter for id.- Returns:
- the id
-
getName
public String getName()
Getter for name.- Returns:
- the name
-
getHost
public String getHost()
Getter for host.- Returns:
- the host
-
getTimeoutInSeconds
public int getTimeoutInSeconds()
Getter for time-out.- Returns:
- the time-out
-
createGerritSlaveFromJSON
public static GerritSlave createGerritSlaveFromJSON(net.sf.json.JSONObject obj)
Creates a GerritSlave from a JSONObject.- Parameters:
obj
- the JSONObject.- Returns:
- a GerritSlave.
-
-