Class Endpoint

java.lang.Object
com.tikal.hudson.plugins.notification.Endpoint

public class Endpoint extends Object
  • Field Details

    • DEFAULT_TIMEOUT

      public static final Integer DEFAULT_TIMEOUT
    • DEFAULT_RETRIES

      public static final Integer DEFAULT_RETRIES
    • DEFAULT_BRANCH

      public static final String DEFAULT_BRANCH
      See Also:
  • Constructor Details

    • Endpoint

      @Deprecated public Endpoint(Protocol protocol, String url, String event, Format format, Integer timeout, Integer loglines)
      Deprecated.
      Adds a new endpoint for notifications
      Parameters:
      protocol - - Protocol to use
      url - Public URL
      event - - Event to fire on.
      format - - Format to send message in.
      timeout - Timeout for sending data
      loglines - - Number of lines to send
    • Endpoint

      @DataBoundConstructor public Endpoint(UrlInfo urlInfo)
      Adds a new endpoint for notifications
      Parameters:
      urlInfo - Information about the target URL for the event.
  • Method Details

    • getUrlInfo

      public UrlInfo getUrlInfo()
    • setUrlInfo

      public void setUrlInfo(UrlInfo urlInfo)
    • getTimeout

      public int getTimeout()
    • setTimeout

      @DataBoundSetter public void setTimeout(Integer timeout)
      Sets a timeout for the notification.
      Parameters:
      timeout - - Timeout in ms. Default is 30s (30000)
    • getProtocol

      public Protocol getProtocol()
    • setProtocol

      @DataBoundSetter public void setProtocol(Protocol protocol)
      Sets the protocol for the
      Parameters:
      protocol - Protocol to use. Valid values are: UDP, TCP, HTTP. Default is HTTP. HTTP event target urls must start with 'http'
    • getEvent

      public String getEvent()
    • setEvent

      @DataBoundSetter public void setEvent(String event)
      Sets the specific event to contact the endpoint for.
      Parameters:
      event - 'STARTED' - Fire on job started. 'COMPLETED' - Fire on job completed. 'FINALIZED' - Fire on job finalized.
    • getFormat

      public Format getFormat()
    • setFormat

      @DataBoundSetter public void setFormat(Format format)
      Format of the message sent to the endpoint should
      Parameters:
      format - 'XML' or 'JSON'
    • getLoglines

      public Integer getLoglines()
    • setLoglines

      @DataBoundSetter public void setLoglines(Integer loglines)
      Set the number of log lines to send with the message.
      Parameters:
      loglines - - Default 0, -1 for unlimited.
    • getBuildNotes

      public String getBuildNotes()
    • setBuildNotes

      @DataBoundSetter public void setBuildNotes(String buildNotes)
      Set any additional build information to be sent in message.
      Parameters:
      buildNotes - - the additional data
    • isJson

      public boolean isJson()
    • getRetries

      public Integer getRetries()
    • setRetries

      @DataBoundSetter public void setRetries(Integer retries)
      Number of retries before giving up on contacting an endpoint
      Parameters:
      retries - - Number of retries. Default 0.
    • readResolve

      protected Object readResolve()
    • getBranch

      public String getBranch()
    • setBranch

      @DataBoundSetter public void setBranch(String branch)
      Sets branch filter
      Parameters:
      branch - - regex
    • toString

      public String toString()
      Overrides:
      toString in class Object