public class AgentMessagingLayer extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandMessageListener(CommandMessageListener listener)
Adds a listener on the Command bus.
|
void |
addCommandMessageListener(CommandMessageListener listener,
Predicate<BusMessage<? extends Serializable,?>> filter)
Adds a listener on the Command bus with a filter.
|
void |
addLogMessageListener(LogMessageListener listener)
Adds a listener on the Log bus.
|
void |
addLogMessageListener(LogMessageListener listener,
Predicate<BusMessage<? extends Serializable,?>> filter)
Adds a listener on the Log bus with a filter.
|
void |
addStatusMessageListener(StatusMessageListener listener)
Adds a listener on the Status bus.
|
void |
addStatusMessageListener(StatusMessageListener listener,
Predicate<BusMessage<? extends Serializable,?>> filter)
Adds a listener on the Status bus with a filter.
|
static AgentMessagingLayer |
createInstance(AgentInfo agentInfo)
Build an Instance of an AgentMessagingLayer for a given Agent by
providing the AgentInfo object.
|
AgentInfo |
getAgentInfo() |
String |
getAgentName() |
AgentPresenceManager |
getAgentPresenceManager() |
protected org.lsst.ccs.messaging.BusApplicationLayer |
getApplicationLayer() |
void |
removeCommandMessageListener(CommandMessageListener listener)
Removes a listener on the Command bus
|
void |
removeLogMessageListener(LogMessageListener listener)
Removes a listener on the Log bus
|
void |
removeStatusMessageListener(StatusMessageListener listener)
Removes a listener on the Status bus
|
void |
sendCommandReply(CommandReply reply)
Sends a Command Reply on the Command Bus.
|
void |
sendCommandRequest(CommandRequest cmd,
CommandOriginator originator)
Sends a Command Request on the Command Bus.
|
void |
sendLogMessage(LogMessage msg)
Sends a Log Message on the Log Bus
|
void |
sendStatusMessage(StatusMessage msg)
Sends a Status Message on the Status Bus
|
void |
setCommandExecutor(CommandExecutor executor)
Defines the component able to execute an incoming command
|
void |
shutdownBusAccess() |
public static AgentMessagingLayer createInstance(AgentInfo agentInfo)
agentInfo - The AgentInfo of the object for which we are creating the
AgentMessagingLayer.public AgentInfo getAgentInfo()
public String getAgentName()
protected org.lsst.ccs.messaging.BusApplicationLayer getApplicationLayer()
public void shutdownBusAccess()
public AgentPresenceManager getAgentPresenceManager()
public void addLogMessageListener(LogMessageListener listener)
listener - the listener to be added on the Log buspublic void addLogMessageListener(LogMessageListener listener, Predicate<BusMessage<? extends Serializable,?>> filter)
listener - the listener to be added on the Log busfilter - The BusMessageFilter to be applied to the incoming Bus
Messagespublic void addStatusMessageListener(StatusMessageListener listener)
listener - the listener to be added on the Status buspublic void addStatusMessageListener(StatusMessageListener listener, Predicate<BusMessage<? extends Serializable,?>> filter)
listener - the listener to be added on the Status busfilter - The BusMessageFilter to be applied to the incoming Bus
Messagespublic void addCommandMessageListener(CommandMessageListener listener)
listener - the listener to be added on the Command buspublic void addCommandMessageListener(CommandMessageListener listener, Predicate<BusMessage<? extends Serializable,?>> filter)
listener - the listener to be added on the Command busfilter - The BusMessageFilter to be applied to the incoming Bus
Messagespublic void removeLogMessageListener(LogMessageListener listener)
listener - the listener to be removed on the Log buspublic void removeStatusMessageListener(StatusMessageListener listener)
listener - the listener to be removed on the Status buspublic void removeCommandMessageListener(CommandMessageListener listener)
listener - the listener to be removed on the Command buspublic void sendLogMessage(LogMessage msg)
msg - The message to be sent on the Log buspublic void sendStatusMessage(StatusMessage msg)
msg - The message to be sent on the Status buspublic void sendCommandRequest(CommandRequest cmd, CommandOriginator originator)
cmd - The CommandRequest to be sent on the Command busoriginator - The component that has requested the execution of the commandpublic void sendCommandReply(CommandReply reply)
reply - The CommandReply to be sent on the Command buspublic void setCommandExecutor(CommandExecutor executor)
executor - Copyright © 2016 LSST. All rights reserved.