public class AgentMessagingLayer extends Object implements AgentMessagingLayerMBean
| Modifier and Type | Class and Description |
|---|---|
static class |
AgentMessagingLayer.ConnectionStatus |
| Modifier and Type | Method and Description |
|---|---|
void |
addBusMessagePreProcessor(BusMessagePreProcessor preProcessor)
Add a BusMessagePreProcessor the the AgentMessagingLayer.
|
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.
|
void |
connectToBuses() |
static AgentMessagingLayer |
createInstance(AgentInfo agentInfo,
LockLevelService lockLevelService)
Build an Instance of an AgentMessagingLayer for a given Agent by
providing the AgentInfo object.
|
AgentInfo |
getAgentInfo() |
LockLevelService |
getAgentLockService() |
AgentPresenceManager |
getAgentPresenceManager() |
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 |
restart(int seconds)
This method is meant to be invoked from JMX
|
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 |
setClusterDeserializationErrorHandler(ClusterDeserializationErrorHandler h) |
void |
setCommandExecutor(CommandExecutor executor)
Defines the component able to execute an incoming command
|
void |
shutdownBusAccess() |
public static AgentMessagingLayer createInstance(AgentInfo agentInfo, LockLevelService lockLevelService)
agentInfo - lockLevelService - public void restart(int seconds)
restart in interface AgentMessagingLayerMBeanseconds - The number of seconds to wait before restarting the messaging layer.public final void addBusMessagePreProcessor(BusMessagePreProcessor preProcessor)
preProcessor - The BusMessagePreProcessor to be added.public org.lsst.ccs.messaging.BusApplicationLayer getApplicationLayer()
public AgentInfo getAgentInfo()
public void shutdownBusAccess()
public void connectToBuses()
public AgentPresenceManager getAgentPresenceManager()
public LockLevelService getAgentLockService()
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 commandDestinationsException - if the command target is not present on
the buses.public void sendCommandReply(CommandReply reply)
reply - The CommandReply to be sent on the Command buspublic void setCommandExecutor(CommandExecutor executor)
executor - public void setClusterDeserializationErrorHandler(ClusterDeserializationErrorHandler h)
Copyright © 2021 LSST. All rights reserved.