public class ProtobufAlarmClient extends Object implements AlarmSender
| Constructor and Description |
|---|
ProtobufAlarmClient(String host,
int port)
Creates a new AlarmSender which will connect to a ProtobufAlarmSender on the
specified host and TCP port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shuts down the alarm queue.
|
protected void |
send(AlarmProtos.Alarm alarm)
This is the method invoked by interface methods.
|
void |
sendAlarm(String msg) |
void |
sendAlarm(String msg,
String source) |
void |
sendAlarmAlways(String msg) |
void |
sendAlarmAlways(String msg,
String source) |
void |
setConnectTimeout(int value)
Sets the connection timeout.
|
public ProtobufAlarmClient(String host, int port)
public void setConnectTimeout(int value)
public void sendAlarm(String msg, String source)
sendAlarm in interface AlarmSenderpublic void sendAlarmAlways(String msg, String source)
sendAlarmAlways in interface AlarmSenderpublic void sendAlarm(String msg)
sendAlarm in interface AlarmSenderpublic void sendAlarmAlways(String msg)
sendAlarmAlways in interface AlarmSenderprotected void send(AlarmProtos.Alarm alarm)
alarm - An Alarm message compiled from a .proto file.@PreDestroy public void close()