Package io.netty.channel.group
Class ChannelMatchers
- java.lang.Object
-
- io.netty.channel.group.ChannelMatchers
-
public final class ChannelMatchers extends java.lang.ObjectHelper class which provides often usedChannelMatcherimplementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classChannelMatchers.ClassMatcherprivate static classChannelMatchers.CompositeMatcherprivate static classChannelMatchers.InstanceMatcherprivate static classChannelMatchers.InvertMatcher
-
Field Summary
Fields Modifier and Type Field Description private static ChannelMatcherALL_MATCHERprivate static ChannelMatcherNON_SERVER_CHANNEL_MATCHERprivate static ChannelMatcherSERVER_CHANNEL_MATCHER
-
Constructor Summary
Constructors Modifier Constructor Description privateChannelMatchers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChannelMatcherall()Returns aChannelMatcherthat matches allChannels.static ChannelMatchercompose(ChannelMatcher... matchers)Return a composite of the givenChannelMatchers.static ChannelMatcherinvert(ChannelMatcher matcher)Invert the givenChannelMatcher.static ChannelMatcheris(Channel channel)Returns aChannelMatcherthat matches the givenChannel.static ChannelMatcherisInstanceOf(java.lang.Class<? extends Channel> clazz)Returns aChannelMatcherthat matches allChannels that are an instance of sub-type of the given class.static ChannelMatcherisNonServerChannel()static ChannelMatcherisNot(Channel channel)Returns aChannelMatcherthat matches allChannels except the given.static ChannelMatcherisNotInstanceOf(java.lang.Class<? extends Channel> clazz)Returns aChannelMatcherthat matches allChannels that are not an instance of sub-type of the given class.static ChannelMatcherisServerChannel()
-
-
-
Field Detail
-
ALL_MATCHER
private static final ChannelMatcher ALL_MATCHER
-
SERVER_CHANNEL_MATCHER
private static final ChannelMatcher SERVER_CHANNEL_MATCHER
-
NON_SERVER_CHANNEL_MATCHER
private static final ChannelMatcher NON_SERVER_CHANNEL_MATCHER
-
-
Method Detail
-
all
public static ChannelMatcher all()
Returns aChannelMatcherthat matches allChannels.
-
isNot
public static ChannelMatcher isNot(Channel channel)
Returns aChannelMatcherthat matches allChannels except the given.
-
is
public static ChannelMatcher is(Channel channel)
Returns aChannelMatcherthat matches the givenChannel.
-
isInstanceOf
public static ChannelMatcher isInstanceOf(java.lang.Class<? extends Channel> clazz)
Returns aChannelMatcherthat matches allChannels that are an instance of sub-type of the given class.
-
isNotInstanceOf
public static ChannelMatcher isNotInstanceOf(java.lang.Class<? extends Channel> clazz)
Returns aChannelMatcherthat matches allChannels that are not an instance of sub-type of the given class.
-
isServerChannel
public static ChannelMatcher isServerChannel()
-
isNonServerChannel
public static ChannelMatcher isNonServerChannel()
-
invert
public static ChannelMatcher invert(ChannelMatcher matcher)
Invert the givenChannelMatcher.
-
compose
public static ChannelMatcher compose(ChannelMatcher... matchers)
Return a composite of the givenChannelMatchers. This means allChannelMatchermust returntrueto match.
-
-