public class HttpChannel extends AbstractAlarmChannel
log| Constructor and Description |
|---|
HttpChannel() |
| Modifier and Type | Method and Description |
|---|---|
protected Runnable |
createSendTask(String msg,
String source)
Subclasses need to create and return a new Runnable in each call to this method.
|
protected boolean |
hasSource(String alarmSource)
This method is used to determine if a certain alarm channel has a special condition for the specified
alarmSource or not.
|
void |
init()
Initializes the cached URL if the URL value has no alarm or source variables, and validates that there is postData if
the URL is going to be cached.
|
void |
setAlarmSource(Set<String> value)
You can set a list of sources in this property so that only alarm messages matching any of the sources
are be posted as status updates.
|
void |
setExpectedResponse(String value)
If this property is set, the channel waits for a response and scans it for this particular string,
warning if not found.
|
void |
setPostData(String value)
Sets the POST data for the HTTP request.
|
void |
setUrl(String value)
Sets the URL to send the alarm to.
|
getMinResendInterval, send, setAllowSynchronousSend, setMinResendInterval, shutdownpublic void setExpectedResponse(String value)
public void setAlarmSource(Set<String> value)
public void setUrl(String value) throws MalformedURLException
MalformedURLExceptionpublic void setPostData(String value)
protected Runnable createSendTask(String msg, String source)
AbstractAlarmChannelcreateSendTask in class AbstractAlarmChannelmsg - The message to be sent.source - The alarm source. A channel can have different recipient lists depending on the alarm source.protected boolean hasSource(String alarmSource)
AbstractAlarmChannelhasSource in class AbstractAlarmChannel@PostConstruct public void init() throws MalformedURLException
MalformedURLException - if the url is fixed (no ${alarm} or ${source}) and it cannot be converted to a valid URL.