List of usage examples for io.netty.channel Channel hasAttr
<T> boolean hasAttr(AttributeKey<T> key);
From source file:com.ibasco.agql.core.transport.NettyPooledTransport.java
License:Open Source License
/** * <p>A method to perform cleanup operations on a {@link Channel}. This is called after every invocation of {@link * #send(AbstractRequest)}.</p>/*ww w . jav a 2 s . co m*/ * * @param c * The {@link Channel} that will need to be cleaned-up/released. */ @Override public void cleanupChannel(Channel c) { //Release channel from the pool if (c.hasAttr(ChannelAttributes.CHANNEL_POOL)) c.attr(ChannelAttributes.CHANNEL_POOL).get().release(c); }