TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
TCPNIOConnection obtainNIOConnection(final SocketChannel channel) { final TCPNIOConnection connection = new TCPNIOConnection(this, channel); configureNIOConnection(connection); return connection; }
public void testEventUpstream() throws Exception { final Connection connection = new TCPNIOConnection(TCPNIOTransportBuilder.newInstance().build(), null); counterAttr.set(connection, new AtomicInteger(0)); final FilterChain chain = FilterChainBuilder.stateless() .add(new EventCounterFilter(0)) .add(new EventCounterFilter(1)) .add(new EventCounterFilter(2)) .add(new EventCounterFilter(3)) .build(); final FutureImpl<FilterChainContext> resultFuture = Futures.createSafeFuture(); chain.fireEventUpstream(connection, INC_EVENT, Futures.toCompletionHandler(resultFuture)); resultFuture.get(10, TimeUnit.SECONDS); }
public void testEventDownstream() throws Exception { final Connection connection = new TCPNIOConnection(TCPNIOTransportBuilder.newInstance().build(), null); counterAttr.set(connection, new AtomicInteger(3)); final FilterChain chain = FilterChainBuilder.stateless() .add(new EventCounterFilter(0)) .add(new EventCounterFilter(1)) .add(new EventCounterFilter(2)) .add(new EventCounterFilter(3)) .build(); final FutureImpl<FilterChainContext> resultFuture = Futures.createSafeFuture(); chain.fireEventDownstream(connection, DEC_EVENT, Futures.toCompletionHandler(resultFuture)); resultFuture.get(10, TimeUnit.SECONDS); }