com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data
Class GerritSlave

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<GerritSlave>
      extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritSlave
All Implemented Interfaces:
hudson.model.Describable<GerritSlave>

public class GerritSlave
extends hudson.model.AbstractDescribableImpl<GerritSlave>

Represents a Gerrit slave after which we wait for replication events.

Author:
Mathieu Wang <mathieu.wang@ericsson.com>

Nested Class Summary
static class GerritSlave.GerritSlaveDescriptor
          The Descriptor for a GerritSlave.
 
Field Summary
static int DISABLED_TIMEOUT_VALUE
          Disabled timeout value.
 
Constructor Summary
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
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISABLED_TIMEOUT_VALUE

public static final int DISABLED_TIMEOUT_VALUE
Disabled timeout value.

See Also:
Constant Field Values
Constructor Detail

GerritSlave

public GerritSlave(String id,
                   String name,
                   String host,
                   int timeoutInSeconds)
Standard Constructor.

Parameters:
id - the ID or null to generate a new one
name - the name to represent/identify this gerritSlave
host - 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 gerritSlave
host - 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.


Copyright © 2004-2014. All Rights Reserved.