Class Endpoint
java.lang.Object
com.tikal.hudson.plugins.notification.Endpoint
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEvent()
int
boolean
isJson()
protected Object
void
Sets branch filtervoid
setBuildNotes
(String buildNotes) Set any additional build information to be sent in message.void
Sets the specific event to contact the endpoint for.void
Format of the message sent to the endpoint shouldvoid
setLoglines
(Integer loglines) Set the number of log lines to send with the message.void
setProtocol
(Protocol protocol) Sets the protocol for thevoid
setRetries
(Integer retries) Number of retries before giving up on contacting an endpointvoid
setTimeout
(Integer timeout) Sets a timeout for the notification.void
setUrlInfo
(UrlInfo urlInfo) toString()
-
Field Details
-
DEFAULT_TIMEOUT
-
DEFAULT_RETRIES
-
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 useurl
- Public URLevent
- - Event to fire on.format
- - Format to send message in.timeout
- Timeout for sending dataloglines
- - Number of lines to send
-
Endpoint
Adds a new endpoint for notifications- Parameters:
urlInfo
- Information about the target URL for the event.
-
-
Method Details
-
getUrlInfo
-
setUrlInfo
-
getTimeout
public int getTimeout() -
setTimeout
Sets a timeout for the notification.- Parameters:
timeout
- - Timeout in ms. Default is 30s (30000)
-
getProtocol
-
setProtocol
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
-
setEvent
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
-
setFormat
Format of the message sent to the endpoint should- Parameters:
format
- 'XML' or 'JSON'
-
getLoglines
-
setLoglines
Set the number of log lines to send with the message.- Parameters:
loglines
- - Default 0, -1 for unlimited.
-
getBuildNotes
-
setBuildNotes
Set any additional build information to be sent in message.- Parameters:
buildNotes
- - the additional data
-
isJson
public boolean isJson() -
getRetries
-
setRetries
Number of retries before giving up on contacting an endpoint- Parameters:
retries
- - Number of retries. Default 0.
-
readResolve
-
getBranch
-
setBranch
Sets branch filter- Parameters:
branch
- - regex
-
toString
-