
public class StateBundleAggregator extends Object implements StatusMessageListener, AgentPresenceListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
StateBundleAggregator.Observer |
| Constructor and Description |
|---|
StateBundleAggregator(AgentMessagingLayer messagingLayer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(StateBundleAggregator.Observer o) |
void |
addOrigin(String origin) |
void |
connecting(AgentInfo... agents)
Indicates that the list of agents represented by
agents is present on the
buses. |
void |
deleteObserver(StateBundleAggregator.Observer o) |
void |
disconnecting(AgentInfo agent)
Indicates that the agent represented by
agent has left the buses. |
StateBundle |
getState(String origin) |
Map<String,StateBundle> |
getStates() |
void |
notifyObservers(String origin,
StateBundle old,
StateBundle change) |
void |
onStatusMessage(StatusMessage msg)
Called when a status message is received.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnected, disconnectedpublic StateBundleAggregator(AgentMessagingLayer messagingLayer)
public void addOrigin(String origin)
public void onStatusMessage(StatusMessage msg)
StatusMessageListeneronStatusMessage in interface StatusMessageListenermsg - Status bus message to be processed.public void addObserver(StateBundleAggregator.Observer o)
public void deleteObserver(StateBundleAggregator.Observer o)
public void notifyObservers(String origin, StateBundle old, StateBundle change)
public StateBundle getState(String origin)
public Map<String,StateBundle> getStates()
public void connecting(AgentInfo... agents)
AgentPresenceListeneragents is present on the
buses.
This method is invoked when the listener is added with all the agents that
are already connected.
At this point not all services on the connecting agents
are guaranteed to have completely started. This method should be used only
to receive a notification that an agent is connecting.
For a guarantee that an agent information is fully present, please use the
#connected methods.
The implementation should return immediately : any blocking operations
should be scheduled on a separate thread.connecting in interface AgentPresenceListenerpublic void disconnecting(AgentInfo agent)
AgentPresenceListeneragent has left the buses.
The implementation should return immediately : any blocking operations
should be scheduled on a separate thread.disconnecting in interface AgentPresenceListenerCopyright © 2020 LSST. All rights reserved.