public class Endpoint extends Object
| Modifier and Type | Field and Description |
|---|---|
static Integer |
DEFAULT_RETRIES |
static Integer |
DEFAULT_TIMEOUT |
| Constructor and Description |
|---|
Endpoint(Protocol protocol,
String url,
String event,
Format format,
Integer timeout,
Integer loglines)
Deprecated.
|
Endpoint(UrlInfo urlInfo)
Adds a new endpoint for notifications
|
| Modifier and Type | Method and Description |
|---|---|
String |
getEvent() |
Format |
getFormat() |
Integer |
getLoglines() |
Protocol |
getProtocol() |
Integer |
getRetries() |
int |
getTimeout() |
UrlInfo |
getUrlInfo() |
boolean |
isJson() |
protected Object |
readResolve() |
void |
setEvent(String event)
Sets the specific event to contact the endpoint for.
|
void |
setFormat(Format format)
Format of the message sent to the endpoint should
|
void |
setLoglines(Integer loglines)
Set the number of log lines to send with the message.
|
void |
setProtocol(Protocol protocol)
Sets the protocol for the
|
void |
setRetries(Integer retries)
Number of retries before giving up on contacting an endpoint
|
void |
setTimeout(Integer timeout)
Sets a timeout for the notification.
|
void |
setUrlInfo(UrlInfo urlInfo) |
String |
toString() |
public static final Integer DEFAULT_TIMEOUT
public static final Integer DEFAULT_RETRIES
@Deprecated public Endpoint(Protocol protocol, String url, String event, Format format, Integer timeout, Integer loglines)
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@DataBoundConstructor public Endpoint(UrlInfo urlInfo)
urlInfo - Information about the target URL for the event.public UrlInfo getUrlInfo()
public void setUrlInfo(UrlInfo urlInfo)
public int getTimeout()
@DataBoundSetter public void setTimeout(Integer timeout)
timeout - - Timeout in ms. Default is 30s (30000)public Protocol getProtocol()
@DataBoundSetter public void setProtocol(Protocol protocol)
protocol - Protocol to use. Valid values are: UDP, TCP, HTTP. Default is HTTP.
HTTP event target urls must start with 'http'public String getEvent()
@DataBoundSetter public void setEvent(String event)
event - 'STARTED' - Fire on job started. 'COMPLETED' - Fire on job completed. 'FINALIZED' - Fire on job finalized.public Format getFormat()
@DataBoundSetter public void setFormat(Format format)
format - 'XML' or 'JSON'public Integer getLoglines()
@DataBoundSetter public void setLoglines(Integer loglines)
loglines - - Default 0, -1 for unlimited.public boolean isJson()
public Integer getRetries()
@DataBoundSetter public void setRetries(Integer retries)
retries - - Number of retries. Default 0.protected Object readResolve()
Copyright © 2016–2017. All rights reserved.