List of usage examples for io.netty.channel Channel metadata
ChannelMetadata metadata();
From source file:org.vertx.java.core.impl.FlowControlHandler.java
License:Apache License
@Override public void beforeAdd(final ChannelHandlerContext ctx) throws Exception { this.ctx = ctx; Channel channel = ctx.channel(); if (channel.metadata().bufferType() == BufType.BYTE) { outboundBuf = channel.unsafe().directOutboundContext().outboundByteBuffer(); } else {//w w w. j a v a2 s .c om throw new IllegalStateException("Only supported for Channels which handle bytes"); } super.beforeAdd(ctx); }