public interface ChannelSelector
AgentChannel satisfies certain criteria.| Modifier and Type | Field and Description |
|---|---|
static ChannelSelector |
ALL
Predefined selector that accepts all channels.
|
static Pattern |
pRegEx |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accept(List<String> agents,
List<ChannelSelector> channelSelectors,
AgentChannel channel)
Checks whether the specified channel is accepted by at least one of the provided selectors.
|
static List<ChannelSelector> |
compile(Collection<String> rawSelectors)
Constructs selectors from their string representations (in path, template, or selector format).
|
static ChannelSelector |
compile(String rawSelector)
Constructs a selector based on a string in path, template, or selector format.
|
static <T extends AgentChannel> |
filter(List<String> agents,
List<ChannelSelector> channelSelectors,
Collection<T> channels) |
static <T extends AgentChannel> |
filter(List<String> agents,
List<ChannelSelector> channelSelectors,
Collection<T> channels,
List<T> out)
Appends channels matching selectors to the provided list.
|
String |
getAgent() |
boolean |
match(AgentChannel channel)
Checks whether the specified channel is accepted by this selector.
|
static final ChannelSelector ALL
static final Pattern pRegEx
static ChannelSelector compile(String rawSelector)
AgentStatusAggregator.addListener(...) for details.rawSelector - String representation of selector.ChannelSelector.static List<ChannelSelector> compile(Collection<String> rawSelectors)
AgentStatusAggregator.addListener(...) for details.rawSelectors - String representations of selectors.ChannelSelector.static boolean accept(List<String> agents, List<ChannelSelector> channelSelectors, AgentChannel channel)
agents - channelSelectors - channel - Channel to check.static <T extends AgentChannel> List<T> filter(List<String> agents, List<ChannelSelector> channelSelectors, Collection<T> channels)
static <T extends AgentChannel> List<T> filter(List<String> agents, List<ChannelSelector> channelSelectors, Collection<T> channels, List<T> out)
T - Type of input and output lists, subclass of AgentChannel.agents - channelSelectors - channels - out - String getAgent()
boolean match(AgentChannel channel)
channel - Channel to check.true if the channel satisfies the criteria of this selector.Copyright © 2022 LSST. All rights reserved.