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.
-
-
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()
-
-
-
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.
-
-