|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.solab.alarms.AbstractAlarmChannel
com.solab.alarms.channels.CommandLineChannel
public class CommandLineChannel
This alarm channel executes a command-line program, either passing the alarm message as a parameter to it as an argument of ${alarm}, or feeding the alarm message to its STDIN.
| Field Summary |
|---|
| Fields inherited from class com.solab.alarms.AbstractAlarmChannel |
|---|
log |
| Constructor Summary | |
|---|---|
CommandLineChannel()
|
|
| Method Summary | |
|---|---|
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 |
setCommand(String value)
Sets the command to execute, as a single statement to be execute. |
void |
setCommandsBySource(Map<String,String> value)
Sets a map with different commands to be executed depending on the alarm source. |
void |
setCommandsWithArgsBySource(Map<String,String[]> value)
Sets a map with different commands to be executed depending on the alarm source. |
void |
setCommandWithArgs(List<String> value)
Sets the command to execute, with each argument as a separate element. |
| Methods inherited from class com.solab.alarms.AbstractAlarmChannel |
|---|
getMinResendInterval, send, setMinResendInterval, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandLineChannel()
| Method Detail |
|---|
public void setCommand(String value)
public void setCommandWithArgs(List<String> value)
public void setCommandsWithArgsBySource(Map<String,String[]> value)
public void setCommandsBySource(Map<String,String> value)
protected Runnable createSendTask(String msg,
String source)
AbstractAlarmChannel
createSendTask 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)
AbstractAlarmChannel
hasSource in class AbstractAlarmChannel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||