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>
  • Field Details

    • DISABLED_TIMEOUT_VALUE

      public static final int DISABLED_TIMEOUT_VALUE
      Disabled timeout value.
      See Also:
  • Constructor Details

    • GerritSlave

      @DataBoundConstructor 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 Details

    • 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.