io.netty.util.internal.TypeParameterMatcher Java Examples
The following examples show how to use
io.netty.util.internal.TypeParameterMatcher.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReliableChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
public ReliableChannelHandler(ReliableEndpoint endpoint) { this.endpoint = endpoint; matcher = TypeParameterMatcher.get(DatagramPacket.class); }
Example #2
Source File: MessageToMessageEncoder.java From netty4.0.27Learn with Apache License 2.0 | 4 votes |
/** * Create a new instance which will try to detect the types to match out of the type parameter of the class. */ protected MessageToMessageEncoder() { matcher = TypeParameterMatcher.find(this, MessageToMessageEncoder.class, "I"); }
Example #3
Source File: MessageToMessageDecoder.java From netty4.0.27Learn with Apache License 2.0 | 4 votes |
/** * Create a new instance which will try to detect the types to match out of the type parameter of the class. */ protected MessageToMessageDecoder() { matcher = TypeParameterMatcher.find(this, MessageToMessageDecoder.class, "I"); }
Example #4
Source File: MessageToMessageCodec.java From netty4.0.27Learn with Apache License 2.0 | 4 votes |
/** * Create a new instance which will try to detect the types to decode and encode out of the type parameter * of the class. */ protected MessageToMessageCodec() { inboundMsgMatcher = TypeParameterMatcher.find(this, MessageToMessageCodec.class, "INBOUND_IN"); outboundMsgMatcher = TypeParameterMatcher.find(this, MessageToMessageCodec.class, "OUTBOUND_IN"); }
Example #5
Source File: NettyClientService.java From sailfish-core with Apache License 2.0 | 4 votes |
public OutboundBlackholeHandler(Class<? extends T> outboundMessageType) { matcher = TypeParameterMatcher.get(outboundMessageType); }
Example #6
Source File: AbstractChannelHandler.java From spring-boot-protocol with Apache License 2.0 | 4 votes |
protected AbstractChannelHandler(boolean autoRelease) { matcherInbound = TypeParameterMatcher.find(this, AbstractChannelHandler.class, "I"); matcherOutbound = TypeParameterMatcher.find(this, AbstractChannelHandler.class, "O"); this.autoRelease = autoRelease; }
Example #7
Source File: MessageToMessageCodec.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
/** * Create a new instance which will try to detect the types to decode and encode out of the type parameter * of the class.创建一个新的实例,该实例将尝试检测用于解码和编码类的类型参数的类型。 */ protected MessageToMessageCodec() { inboundMsgMatcher = TypeParameterMatcher.find(this, MessageToMessageCodec.class, "INBOUND_IN"); outboundMsgMatcher = TypeParameterMatcher.find(this, MessageToMessageCodec.class, "OUTBOUND_IN"); }
Example #8
Source File: EndpointedChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
public EndpointedChannelHandler(Class<T> packetType, Endpoint<T> endpoint) { this.endpoint = endpoint; matcher = TypeParameterMatcher.get(packetType); }
Example #9
Source File: ReliableChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
ReliableChannelHandler() { matcher = TypeParameterMatcher.get(DatagramPacket.class); }
Example #10
Source File: MessageToMessageDecoder.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
/** * Create a new instance which will try to detect the types to match out of the type parameter of the class.创建一个新的实例,该实例将尝试检测与类的类型参数匹配的类型。 */ protected MessageToMessageDecoder() { matcher = TypeParameterMatcher.find(this, MessageToMessageDecoder.class, "I"); }
Example #11
Source File: EndpointedChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
public EndpointedChannelHandler(boolean autoRelease, Class<T> packetType, Endpoint<T> endpoint) { this.autoRelease = autoRelease; this.endpoint = endpoint; matcher = TypeParameterMatcher.get(packetType); }
Example #12
Source File: Client.java From luna with MIT License | 4 votes |
/** * Creates a new {@link Client}. * * @param channel The underlying channel. */ Client(Channel channel) { this.channel = channel; ipAddress = NetworkUtils.getIpAddress(channel); parameterMatcher = TypeParameterMatcher.find(this, Client.class, "I"); }
Example #13
Source File: MessageToMessageEncoder.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
protected MessageToMessageEncoder() { this.matcher = TypeParameterMatcher.find(this, MessageToMessageEncoder.class, "I"); }
Example #14
Source File: MessageToMessageEncoder.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
protected MessageToMessageEncoder(final Class<? extends I> clazz) { this.matcher = TypeParameterMatcher.get(clazz); }
Example #15
Source File: MessageToMessageCodec.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
protected MessageToMessageCodec() { inboundMsgMatcher = TypeParameterMatcher.find(this, MessageToMessageCodec.class, "INBOUND_IN"); outboundMsgMatcher = TypeParameterMatcher.find(this, MessageToMessageCodec.class, "OUTBOUND_IN"); }
Example #16
Source File: AbstractAddressResolver.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
/** * @param executor the {@link EventExecutor} which is used to notify the listeners of the {@link Future} returned * by {@link #resolve(SocketAddress)} */ protected AbstractAddressResolver(EventExecutor executor) { this.executor = checkNotNull(executor, "executor"); matcher = TypeParameterMatcher.find(this, AbstractAddressResolver.class, "T"); }
Example #17
Source File: MessageToMessageCodec.java From ProtocolSupport with GNU Affero General Public License v3.0 | 4 votes |
protected MessageToMessageCodec(Class<? extends INBOUND_IN> inboundMessageType, Class<? extends OUTBOUND_IN> outboundMessageType) { inboundMsgMatcher = TypeParameterMatcher.get(inboundMessageType); outboundMsgMatcher = TypeParameterMatcher.get(outboundMessageType); }
Example #18
Source File: SimpleChannelInboundHandler.java From netty4.0.27Learn with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param inboundMessageType The type of messages to match * @param autoRelease {@code true} if handled messages should be released automatically by pass them to * {@link ReferenceCountUtil#release(Object)}. */ protected SimpleChannelInboundHandler(Class<? extends I> inboundMessageType, boolean autoRelease) { matcher = TypeParameterMatcher.get(inboundMessageType); this.autoRelease = autoRelease; }
Example #19
Source File: MessageToMessageCodec.java From netty4.0.27Learn with Apache License 2.0 | 2 votes |
/** * Create a new instance. * * @param inboundMessageType The type of messages to decode * @param outboundMessageType The type of messages to encode */ protected MessageToMessageCodec( Class<? extends INBOUND_IN> inboundMessageType, Class<? extends OUTBOUND_IN> outboundMessageType) { inboundMsgMatcher = TypeParameterMatcher.get(inboundMessageType); outboundMsgMatcher = TypeParameterMatcher.get(outboundMessageType); }
Example #20
Source File: MessageToByteEncoder.java From netty4.0.27Learn with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param outboundMessageType The tpye of messages to match * @param preferDirect {@code true} if a direct {@link ByteBuf} should be tried to be used as target for * the encoded messages. If {@code false} is used it will allocate a heap * {@link ByteBuf}, which is backed by an byte array. */ protected MessageToByteEncoder(Class<? extends I> outboundMessageType, boolean preferDirect) { matcher = TypeParameterMatcher.get(outboundMessageType); this.preferDirect = preferDirect; }
Example #21
Source File: MessageToByteEncoder.java From netty4.0.27Learn with Apache License 2.0 | 2 votes |
/** * Create a new instance which will try to detect the types to match out of the type parameter of the class. * * @param preferDirect {@code true} if a direct {@link ByteBuf} should be tried to be used as target for * the encoded messages. If {@code false} is used it will allocate a heap * {@link ByteBuf}, which is backed by an byte array. */ protected MessageToByteEncoder(boolean preferDirect) { matcher = TypeParameterMatcher.find(this, MessageToByteEncoder.class, "I"); this.preferDirect = preferDirect; }
Example #22
Source File: MessageToMessageDecoder.java From netty4.0.27Learn with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param inboundMessageType The type of messages to match and so decode */ protected MessageToMessageDecoder(Class<? extends I> inboundMessageType) { matcher = TypeParameterMatcher.get(inboundMessageType); }
Example #23
Source File: MessageToMessageEncoder.java From netty4.0.27Learn with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param outboundMessageType The type of messages to match and so encode */ protected MessageToMessageEncoder(Class<? extends I> outboundMessageType) { matcher = TypeParameterMatcher.get(outboundMessageType); }
Example #24
Source File: MessageToByteEncoder.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param outboundMessageType The type of messages to match * @param preferDirect {@code true} if a direct {@link ByteBuf} should be tried to be used as target for * the encoded messages. If {@code false} is used it will allocate a heap * {@link ByteBuf}, which is backed by an byte array. */ protected MessageToByteEncoder(Class<? extends I> outboundMessageType, boolean preferDirect) { matcher = TypeParameterMatcher.get(outboundMessageType); this.preferDirect = preferDirect; }
Example #25
Source File: SimpleChannelInboundHandler.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param inboundMessageType The type of messages to match * @param autoRelease {@code true} if handled messages should be released automatically by passing them to * {@link ReferenceCountUtil#release(Object)}. */ protected SimpleChannelInboundHandler(Class<? extends I> inboundMessageType, boolean autoRelease) { matcher = TypeParameterMatcher.get(inboundMessageType); this.autoRelease = autoRelease; }
Example #26
Source File: AbstractAddressResolver.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * @param executor the {@link EventExecutor} which is used to notify the listeners of the {@link Future} returned * by {@link #resolve(SocketAddress)} * @param addressType the type of the {@link SocketAddress} supported by this resolver */ protected AbstractAddressResolver(EventExecutor executor, Class<? extends T> addressType) { this.executor = checkNotNull(executor, "executor"); matcher = TypeParameterMatcher.get(addressType); }
Example #27
Source File: ByteToMessageCodec.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * Create a new instance which will try to detect the types to match out of the type parameter of the class.创建一个新的实例,该实例将尝试检测与类的类型参数匹配的类型。 * * @param preferDirect {@code true} if a direct {@link ByteBuf} should be tried to be used as target for * the encoded messages. If {@code false} is used it will allocate a heap * {@link ByteBuf}, which is backed by an byte array. */ protected ByteToMessageCodec(boolean preferDirect) { ensureNotSharable(); outboundMsgMatcher = TypeParameterMatcher.find(this, ByteToMessageCodec.class, "I"); encoder = new Encoder(preferDirect); }
Example #28
Source File: ByteToMessageCodec.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param outboundMessageType The type of messages to match * @param preferDirect {@code true} if a direct {@link ByteBuf} should be tried to be used as target for * the encoded messages. If {@code false} is used it will allocate a heap * {@link ByteBuf}, which is backed by an byte array. */ protected ByteToMessageCodec(Class<? extends I> outboundMessageType, boolean preferDirect) { ensureNotSharable(); outboundMsgMatcher = TypeParameterMatcher.get(outboundMessageType); encoder = new Encoder(preferDirect); }
Example #29
Source File: MessageToMessageEncoder.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * Create a new instance which will try to detect the types to match out of the type parameter of the class. * 创建一个新的实例,该实例将尝试检测类的类型参数匹配的类型。 */ protected MessageToMessageEncoder() { matcher = TypeParameterMatcher.find(this, MessageToMessageEncoder.class, "I"); }
Example #30
Source File: MessageToMessageEncoder.java From netty-4.1.22 with Apache License 2.0 | 2 votes |
/** * Create a new instance * * @param outboundMessageType The type of messages to match and so encode */ protected MessageToMessageEncoder(Class<? extends I> outboundMessageType) { matcher = TypeParameterMatcher.get(outboundMessageType); }