public interface DisplayChannel
DisplayChannel is identified by a display path unique within a monitoring view,
and is linked to one or more original data channels that contribute to it.
Optionally, DisplayChannel can be assigned an Updatable target that
will be automatically updated whenever there are changes in the channel data.
Equality of display channels should be implemented to be based on their paths.
| Modifier and Type | Method and Description |
|---|---|
default void |
addChannel(AgentChannel channel)
Adds an original published data channel to the list of channels associated with this display channel.
|
default void |
appendChannel(AgentChannel channel)
Appends an original published data channel to the list of channels associated with this display channel.
|
default AgentChannel |
getChannel()
Returns the original published data channel associated with this display channel.
|
default List<AgentChannel> |
getChannels()
Returns an unmodifiable list of original published data channels associated with this display channel.
|
String |
getPath()
Returns the display path associated with this channel.
|
Updatable |
getTarget()
Returns the object that should be notified whenever there are changes to data channels associated with this display channel.
|
default boolean |
purgeOfflineChannels(List<String> agentNames)
Removes all offline channels from the specified agents.
|
default boolean |
removeChannel(String path)
Removes an original published data channel from the list of channels associated with this display channel.
|
void |
setChannel(AgentChannel channel)
Sets the original published data channel associated with this display channel.
|
default void |
setChannels(Collection<AgentChannel> channels)
Sets the list of original published data channels associated with this display channel.
|
void |
setTarget(Updatable target)
Set the object that should be notified whenever there are changes to data channels associated with this display channel.
|
default void |
update(List<String> attributes)
Updates the target.
|
String getPath()
Updatable getTarget()
void setTarget(Updatable target)
target - Target to be notified of changes.default AgentChannel getChannel()
null if no data channels are associated with this display channel.default List<AgentChannel> getChannels()
void setChannel(AgentChannel channel)
channel - Data channel.default void setChannels(Collection<AgentChannel> channels)
channels - Data channels to be associated with this display channel.UnsupportedOperationException - If the provided list contains multiple channels but the implementation only supports single channel association.default void addChannel(AgentChannel channel)
channel - Data channel.UnsupportedOperationException - If the implementation only supports single channel association.default void appendChannel(AgentChannel channel)
channel - Data channel.UnsupportedOperationException - If the implementation only supports single channel association.default boolean removeChannel(String path)
path - Original path of the channel to be removed.UnsupportedOperationException - If the implementation only supports single channel association.default boolean purgeOfflineChannels(List<String> agentNames)
false.agentNames - Agent names.default void update(List<String> attributes)
getAffectedFields(...) method, then calls the appropriate update(...) method of the target.
Most classes implementing this interface will not override this method.attributes - List of attributes whose values might have changed, or null if all attribute values might have changed.Copyright © 2023 LSST. All rights reserved.