Top Description Inners Fields Constructors Methods
io.netty.channel.group

public final Class ChannelMatchers

extends Object
Class Inheritance
Imports
io.netty.channel.Channel, .ServerChannel

Helper class which provides often used ChannelMatcher implementations.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final ChannelMatcher
private static final ChannelMatcher
private static final ChannelMatcher

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ChannelMatcher
all()

Returns a ChannelMatcher that matches all Channels.

public static ChannelMatcher
compose(ChannelMatcher... matchers)

Return a composite of the given ChannelMatchers.

public static ChannelMatcher
invert(ChannelMatcher matcher)

Invert the given ChannelMatcher.

public static ChannelMatcher
is(Channel channel)

Returns a ChannelMatcher that matches the given Channel.

public static ChannelMatcher
isInstanceOf(Class<? extends Channel> clazz)

Returns a ChannelMatcher that matches all Channels that are an instance of sub-type of the given class.

public static ChannelMatcher
isNonServerChannel()

Returns a ChannelMatcher that matches all Channels that are not of type ServerChannel.

public static ChannelMatcher
isNot(Channel channel)

Returns a ChannelMatcher that matches all Channels except the given.

public static ChannelMatcher
isNotInstanceOf(Class<? extends Channel> clazz)

Returns a ChannelMatcher that matches all Channels that are not an instance of sub-type of the given class.

public static ChannelMatcher
isServerChannel()

Returns a ChannelMatcher that matches all Channels that are of type ServerChannel.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALL_MATCHERback to summary
private static final ChannelMatcher ALL_MATCHER
NON_SERVER_CHANNEL_MATCHERback to summary
private static final ChannelMatcher NON_SERVER_CHANNEL_MATCHER
SERVER_CHANNEL_MATCHERback to summary
private static final ChannelMatcher SERVER_CHANNEL_MATCHER

Constructor Detail

ChannelMatchersback to summary
private ChannelMatchers()

Method Detail

allback to summary
public static ChannelMatcher all()

Returns a ChannelMatcher that matches all Channels.

composeback to summary
public static ChannelMatcher compose(ChannelMatcher... matchers)

Return a composite of the given ChannelMatchers. This means all ChannelMatcher must return true to match.

invertback to summary
public static ChannelMatcher invert(ChannelMatcher matcher)

Invert the given ChannelMatcher.

isback to summary
public static ChannelMatcher is(Channel channel)

Returns a ChannelMatcher that matches the given Channel.

isInstanceOfback to summary
public static ChannelMatcher isInstanceOf(Class<? extends Channel> clazz)

Returns a ChannelMatcher that matches all Channels that are an instance of sub-type of the given class.

isNonServerChannelback to summary
public static ChannelMatcher isNonServerChannel()

Returns a ChannelMatcher that matches all Channels that are not of type ServerChannel.

isNotback to summary
public static ChannelMatcher isNot(Channel channel)

Returns a ChannelMatcher that matches all Channels except the given.

isNotInstanceOfback to summary
public static ChannelMatcher isNotInstanceOf(Class<? extends Channel> clazz)

Returns a ChannelMatcher that matches all Channels that are not an instance of sub-type of the given class.

isServerChannelback to summary
public static ChannelMatcher isServerChannel()

Returns a ChannelMatcher that matches all Channels that are of type ServerChannel.

io.netty.channel.group back to summary

private final Class ChannelMatchers.ClassMatcher

extends Object
implements ChannelMatcher
Class Inheritance
All Implemented Interfaces
io.netty.channel.group.ChannelMatcher

Field Summary

Modifier and TypeField and Description
private final Class<? extends Channel>

Constructor Summary

AccessConstructor and Description
pack-priv
ClassMatcher(Class<? extends Channel> clazz)

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(Channel ch)

Implements io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private final Class<? extends Channel> clazz

Constructor Detail

ClassMatcherback to summary
pack-priv ClassMatcher(Class<? extends Channel> clazz)

Method Detail

matchesback to summary
public boolean matches(Channel ch)

Implements io.netty.channel.group.ChannelMatcher.matches.

Doc from io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.

Annotations
@Override
io.netty.channel.group back to summary

private final Class ChannelMatchers.CompositeMatcher

extends Object
implements ChannelMatcher
Class Inheritance
All Implemented Interfaces
io.netty.channel.group.ChannelMatcher

Field Summary

Modifier and TypeField and Description
private final ChannelMatcher[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(Channel channel)

Implements io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matchersback to summary
private final ChannelMatcher[] matchers

Constructor Detail

CompositeMatcherback to summary
pack-priv CompositeMatcher(ChannelMatcher... matchers)

Method Detail

matchesback to summary
public boolean matches(Channel channel)

Implements io.netty.channel.group.ChannelMatcher.matches.

Doc from io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.

Annotations
@Override
io.netty.channel.group back to summary

private final Class ChannelMatchers.InstanceMatcher

extends Object
implements ChannelMatcher
Class Inheritance
All Implemented Interfaces
io.netty.channel.group.ChannelMatcher

Field Summary

Modifier and TypeField and Description
private final Channel

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(Channel ch)

Implements io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelback to summary
private final Channel channel

Constructor Detail

InstanceMatcherback to summary
pack-priv InstanceMatcher(Channel channel)

Method Detail

matchesback to summary
public boolean matches(Channel ch)

Implements io.netty.channel.group.ChannelMatcher.matches.

Doc from io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.

Annotations
@Override
io.netty.channel.group back to summary

private final Class ChannelMatchers.InvertMatcher

extends Object
implements ChannelMatcher
Class Inheritance
All Implemented Interfaces
io.netty.channel.group.ChannelMatcher

Field Summary

Modifier and TypeField and Description
private final ChannelMatcher

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(Channel channel)

Implements io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matcherback to summary
private final ChannelMatcher matcher

Constructor Detail

InvertMatcherback to summary
pack-priv InvertMatcher(ChannelMatcher matcher)

Method Detail

matchesback to summary
public boolean matches(Channel channel)

Implements io.netty.channel.group.ChannelMatcher.matches.

Doc from io.netty.channel.group.ChannelMatcher.matches.

Returns true if the operation should be also executed on the given Channel.

Annotations
@Override