- java.lang.Object
-
- io.netty5.channel.group.ChannelMatchers
-
public final class ChannelMatchers extends Object
Helper class which provides often usedChannelMatcher
implementations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChannelMatcher
all()
Returns aChannelMatcher
that matches allChannel
s.static ChannelMatcher
compose(ChannelMatcher... matchers)
Return a composite of the givenChannelMatcher
s.static ChannelMatcher
invert(ChannelMatcher matcher)
Invert the givenChannelMatcher
.static ChannelMatcher
is(Channel channel)
Returns aChannelMatcher
that matches the givenChannel
.static ChannelMatcher
isInstanceOf(Class<? extends Channel> clazz)
Returns aChannelMatcher
that matches allChannel
s that are an instance of sub-type of the given class.static ChannelMatcher
isNonServerChannel()
static ChannelMatcher
isNot(Channel channel)
Returns aChannelMatcher
that matches allChannel
s except the given.static ChannelMatcher
isNotInstanceOf(Class<? extends Channel> clazz)
Returns aChannelMatcher
that matches allChannel
s that are not an instance of sub-type of the given class.static ChannelMatcher
isServerChannel()
-
-
-
Method Detail
-
all
public static ChannelMatcher all()
Returns aChannelMatcher
that matches allChannel
s.
-
isNot
public static ChannelMatcher isNot(Channel channel)
Returns aChannelMatcher
that matches allChannel
s except the given.
-
is
public static ChannelMatcher is(Channel channel)
Returns aChannelMatcher
that matches the givenChannel
.
-
isInstanceOf
public static ChannelMatcher isInstanceOf(Class<? extends Channel> clazz)
Returns aChannelMatcher
that matches allChannel
s that are an instance of sub-type of the given class.
-
isNotInstanceOf
public static ChannelMatcher isNotInstanceOf(Class<? extends Channel> clazz)
Returns aChannelMatcher
that matches allChannel
s 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 givenChannelMatcher
s. This means allChannelMatcher
must returntrue
to match.
-
-