public class AlertHandler extends Object implements AlertService, org.lsst.ccs.messaging.StatusMessageListener, org.lsst.ccs.messaging.CommandOriginator, org.lsst.ccs.messaging.AgentPresenceListener
| Constructor and Description |
|---|
AlertHandler(LsstAlertPlugin plugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(AlertListener listener)
Adds a listener that will be notified of any future raised or cleared alerts.
|
void |
connecting(org.lsst.ccs.bus.data.AgentInfo agent) |
void |
disconnecting(org.lsst.ccs.bus.data.AgentInfo agent) |
org.lsst.ccs.bus.data.RaisedAlertSummary |
getSummary(String source)
Returns a summary of alerts from the specified source currently known to this
AlertService. |
void |
onStatusMessage(org.lsst.ccs.bus.messages.StatusMessage msg) |
void |
processAck(org.lsst.ccs.bus.messages.CommandAck ack) |
void |
processNack(org.lsst.ccs.bus.messages.CommandNack nack) |
void |
processResult(org.lsst.ccs.bus.messages.CommandResult result) |
void |
removeListener(AlertListener listener)
Removes an alert listener.
|
void |
submitAlert(String source,
org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState level,
String cause)
Submits a locally generated alert for processing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHistorypublic AlertHandler(LsstAlertPlugin plugin)
public void submitAlert(String source, org.lsst.ccs.bus.data.Alert alert, org.lsst.ccs.bus.states.AlertState level, String cause)
AlertService
Note that AlertService implementation is responsible for processing alerts published on the buses.
submitAlert in interface AlertServicesource - Source of alert (typically the name of the subsystem).alert - Alert instance.level - Level at which the alert has been raised.cause - Information string describing the alert being raised.public void onStatusMessage(org.lsst.ccs.bus.messages.StatusMessage msg)
onStatusMessage in interface org.lsst.ccs.messaging.StatusMessageListenerpublic void processAck(org.lsst.ccs.bus.messages.CommandAck ack)
processAck in interface org.lsst.ccs.messaging.CommandOriginatorpublic void processNack(org.lsst.ccs.bus.messages.CommandNack nack)
processNack in interface org.lsst.ccs.messaging.CommandOriginatorpublic void processResult(org.lsst.ccs.bus.messages.CommandResult result)
processResult in interface org.lsst.ccs.messaging.CommandOriginatorpublic void connecting(org.lsst.ccs.bus.data.AgentInfo agent)
connecting in interface org.lsst.ccs.messaging.AgentPresenceListenerpublic void disconnecting(org.lsst.ccs.bus.data.AgentInfo agent)
disconnecting in interface org.lsst.ccs.messaging.AgentPresenceListenerpublic void addListener(AlertListener listener)
AlertServiceaddListener in interface AlertServicelistener - Listener to be registered.public void removeListener(AlertListener listener)
AlertServiceremoveListener in interface AlertServicelistener - Listener to be removed.public org.lsst.ccs.bus.data.RaisedAlertSummary getSummary(String source)
AlertServiceAlertService.getSummary in interface AlertServicesource - Alerts source (typically the name of the subsystem).Copyright © 2018 LSST. All rights reserved.