public class AgentStatusEvent extends EventObject
AgentStatusAggregator to notify AgentStatusListeners of changes in the agent's status.| Modifier and Type | Field and Description |
|---|---|
protected List<AgentChannel> |
addedChannels |
protected List<AgentChannel> |
removedChannels |
protected Map<AgentChannel,List<String>> |
statusChanges |
source| Modifier and Type | Method and Description |
|---|---|
AgentStatusEvent |
filter(AgentChannelsFilter filter)
Creates a new event, keeping only changes that pass the specified filter.
|
AgentStatusEvent |
filter(Set<String> innerPaths)
Creates a new event, keeping only changes in channels whose local (no agent name)
paths are contained in the supplied set.
|
List<AgentChannel> |
getAddedChannels()
Returns a list of new channels.
|
AgentStatusAggregator |
getAggregator()
Returns a reference to the status aggregator that fired this event.
|
org.lsst.ccs.bus.messages.StatusMessage |
getMessage()
Returns the bus message that informed the status aggregator of the change.
|
List<AgentChannel> |
getRemovedChannels()
Returns a list of channels that are no longer published by the agent.
|
org.lsst.ccs.bus.data.AgentInfo |
getSource()
Returns the descriptor of the source agent.
|
Map<AgentChannel,List<String>> |
getStatusChanges()
Returns a map of modified channels to lists of keys of changed attributes.
|
boolean |
isEmpty()
Returns
true if this event has no added, modified, or removed channels. |
String |
toString() |
protected final Map<AgentChannel,List<String>> statusChanges
protected final List<AgentChannel> addedChannels
protected final List<AgentChannel> removedChannels
public org.lsst.ccs.bus.data.AgentInfo getSource()
getSource in class EventObjectpublic org.lsst.ccs.bus.messages.StatusMessage getMessage()
statusChanged(...) method of the listener.public AgentStatusAggregator getAggregator()
public Map<AgentChannel,List<String>> getStatusChanges()
statusChanged(...) method of the listener.public List<AgentChannel> getAddedChannels()
configure(...) and statusChanged(...) methods of the listener.public List<AgentChannel> getRemovedChannels()
statusChanged(...) method of the listener.
Note: with the current implementation, this method never gets called. It is declared in anticipation of implementing filter and dictionary updates.
public boolean isEmpty()
true if this event has no added, modified, or removed channels.true if this event has no added, modified, or removed channels.public AgentStatusEvent filter(Set<String> innerPaths)
innerPaths - Paths to keep. If null, no changes are included in the output event.public AgentStatusEvent filter(AgentChannelsFilter filter)
filter - public String toString()
toString in class EventObjectCopyright © 2018 LSST. All rights reserved.