public interface AgentChannelsFilter extends Savable
[page//]path1/.../pathN/name format.
The exact interpretation of filter output depends on the tool using the filter.
See AgentStatusAggregator#addListener(AgentStatusListener, AgentChannelsFilter)
for more details on using filters to configure agent status aggregator and tools
that rely on it.
| Modifier and Type | Interface and Description |
|---|---|
static class |
AgentChannelsFilter.Event |
static interface |
AgentChannelsFilter.Listener
Interface to be implemented by classes that should be notified of changes in the
AgentChannelsFilter. |
| Modifier and Type | Field and Description |
|---|---|
static PersistableAgentChannelsFilter |
ALL
Trivial filter that accepts all channels and does not modify paths.
|
static String |
CATEGORY
Category for general purpose
Persistable filters. |
| Modifier and Type | Method and Description |
|---|---|
default void |
addListener(AgentChannelsFilter.Listener listener)
Registers a listener that will be notified of any changes in this filter.
|
default List<String> |
getAgents()
Returns a list of agent names accepted by this filter.
|
default Map<String,Object> |
getAttributes(String path)
Returns additional attributes associated with the specified path.
|
default List<String> |
getDisplayChannels()
Returns a list of display paths produced by this filter.
|
default String |
getDisplayPath(AgentChannel channel)
Returns the display channel corresponding to the specified original channel.
|
static List<String> |
getDisplayPath(AgentChannelsFilter filter,
String originPath)
Returns a list of display paths for the specified original path, applying the provided filter.
|
default String |
getDisplayPath(String originPath)
Returns the display channel corresponding to the specified original path.
|
default List<String> |
getDisplayPaths(AgentChannel channel)
Returns a list of display channels for the specified original channel.
|
default List<String> |
getDisplayPaths(String originPath)
Returns a list of display channels for the specified original path.
|
default List<String> |
getFields(boolean compact)
Returns a list of attributes to display for each channel.
|
default String |
getName()
Returns the name of this filter.
|
default List<String> |
getOriginChannels()
Returns a list of original channel paths accepted by this filter.
|
default String |
getOriginPath(String displayPath)
Returns the original path corresponding to the specified display channel.
|
default List<String> |
getOriginPaths(String displayPath)
Returns the list of original paths mapped to the specified display channel.
|
static boolean |
isSelector(String code)
Checks whether the specified string is in the channel selector format (as opposed to explicit path or template).
|
static boolean |
matchTemplate(String path,
String template)
Checks whether the path matches the template.
|
default void |
removeListener(AgentChannelsFilter.Listener listener)
Removes a listener.
|
static final String CATEGORY
Persistable filters.static final PersistableAgentChannelsFilter ALL
default String getName()
The default implementation returns null.
null if this filter has no name.default List<String> getAgents()
The default implementation returns null.
null if any agent might be accepted.default List<String> getOriginChannels()
Note that if this filter is used to configure AgentStatusAggregator or any clients
that rely on it (like monitoring data views), the list returned by this method may contain
templates and selectors. See
AgentStatusAggregator.addListener(listener, agents, channels)
for details.
The default implementation returns null.
null if any
original path for which getDisplayPaths(org.lsst.ccs.gconsole.services.aggregator.AgentChannel) returns a non-empty list is accepted.default List<String> getDisplayChannels()
getDisplayPaths(org.lsst.ccs.gconsole.services.aggregator.AgentChannel)
applied to accepted original channels. Otherwise, any display channels for
which the data is available will be displayed.
The default implementation returns null.
null if the list is not fixed.default String getOriginPath(String displayPath)
null.
The default implementation returns the display path provided as an argument.
displayPath - Display channel path.null if the specified path does not correspond to any original channel.default List<String> getOriginPaths(String displayPath)
The default implementation returns a list that contains one element - the
path returned by getOriginPath(...) - or an
empty list if getOriginPath(...) returns null.
displayPath - Display channel path.default String getDisplayPath(AgentChannel channel)
null.
Not that if the specified original channel is not accepted by this filter,
this method should return an empty list. null should never be returned.
The default implementation forwards the call to getDisplayPath(String)
method. Subclasses may override it to take into account channel attributes and metadata.
channel - Original data channel.default String getDisplayPath(String originPath)
null.
If the specified original channel is not accepted by this filter,
this method should return an empty list. null should never be returned.
The default implementation returns an unmodified original path.
originPath - Original path.default List<String> getDisplayPaths(AgentChannel channel)
Not that if the specified original channel is not accepted by this filter,
this method should return an empty list. null should never be returned.
The default implementation returns a singleton list that contains a string
returned by getDisplayPath(AgentChannel) method.
channel - Original data channel.default List<String> getDisplayPaths(String originPath)
If the specified original channel is not accepted by this filter,
this method should return an empty list. null should never be returned.
The default implementation returns a singleton list that contains a string
returned by getDisplayPath(String) method.
originPath - Original path.default Map<String,Object> getAttributes(String path)
path - Full or partial display path.default List<String> getFields(boolean compact)
compact - If true, returns a list of columns in a compact view.null if this filter does not provides any hints on what attributes should be displayed.default void addListener(AgentChannelsFilter.Listener listener)
listener - Listener to be notified.default void removeListener(AgentChannelsFilter.Listener listener)
listener - Listener to be removed.static List<String> getDisplayPath(AgentChannelsFilter filter, String originPath)
getDisplayPaths(originPath),
getDisplayChannels(), and getOriginChannels().
Templates in the list of origin paths returned by the filter are honored by selectors are ignored.filter - Filter to apply.originPath - Origin path.static boolean matchTemplate(String path, String template)
path - Origin path.template - Path template.static boolean isSelector(String code)
code - String to test.true if the specified string is a channel selector.Copyright © 2019 LSST. All rights reserved.