/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public ChannelListener.Setter<? extends SslConnection> getCloseSetter() { return (ChannelListener.Setter<? extends SslConnection>) super.getCloseSetter(); } }
this.originalSinkConduit = connection.getSinkChannel().getConduit(); connection.getCloseSetter().set(new ChannelListener<StreamConnection>() {
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public ChannelListener.Setter<? extends SslConnection> getCloseSetter() { return (ChannelListener.Setter<? extends SslConnection>) super.getCloseSetter(); } }
public WebConnectionImpl(final StreamConnection channel, ByteBufferPool bufferPool, Executor ioExecutor) { this.channel = channel; this.ioExecutor = ioExecutor; this.outputStream = new UpgradeServletOutputStream(channel.getSinkChannel(), ioExecutor); this.inputStream = new UpgradeServletInputStream(channel.getSourceChannel(), bufferPool, ioExecutor); channel.getCloseSetter().set(new ChannelListener<StreamConnection>() { @Override public void handleEvent(StreamConnection channel) { try { close(); } catch (Exception e) { throw new RuntimeException(e); } } }); }
@Override public void handleUpgrade(final StreamConnection channel, final HttpServerExchange exchange) { channel.getCloseSetter().set(new ChannelListener<StreamConnection>() { @Override public void handleEvent(StreamConnection channel) { try { destroyAction.call(null, null); } catch (Exception e) { throw new RuntimeException(e); } } }); this.exchange.getConnection().getWorker().execute(new Runnable() { @Override public void run() { try { initAction.call(exchange, channel); } catch (Exception e) { throw new RuntimeException(e); } } }); }
final Timer timer = new Timer("SPDY Keep Alive", true); getChannel().getCloseSetter() .set(new ChainedChannelListener<CloseableChannel>( new CancelTimerChannelListener(timer),
final Timer timer = new Timer("SPDY Keep Alive", true); getChannel().getCloseSetter() .set(new ChainedChannelListener<CloseableChannel>( new CancelTimerChannelListener(timer),
this.originalSinkConduit = connection.getSinkChannel().getConduit(); connection.getCloseSetter().set(new ChannelListener<StreamConnection>() {
this.originalSinkConduit = connection.getSinkChannel().getConduit(); connection.getCloseSetter().set(new ChannelListener<StreamConnection>() {