public String toString() { return String.format("%s,g=%s,p=%s,r=%d", super.toString(), _generator, _parser, _requests); }
@Override public void onClose() { super.onClose(); this.connectionState = ConnectionState.CLOSED; }
@Override public void failed(final Throwable x) { onFillInterestedFailed(x); }
@Override public void run() { while(true) { State state=_state.get(); if (next(state,state.onFailed())) break; } onFillInterestedFailed(x); } });
@Override public void onOpen() { super.onOpen(); fillInterested(); }
@Override public void setConnection(Connection connection) { if (connection instanceof AbstractConnection) { AbstractConnection a = (AbstractConnection)connection; if (a.getInputBufferSize()<_sslEngine.getSession().getApplicationBufferSize()) a.setInputBufferSize(_sslEngine.getSession().getApplicationBufferSize()); } super.setConnection(connection); }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } return connection; }
_actualConnection.onFillable(); _actualConnection.onOpen(); _actualConnection.addListener(listener);
/** * <p>Callback method invoked when the endpoint failed to be ready to be read.</p> * @param cause the exception that caused the failure */ protected void onFillInterestedFailed(Throwable cause) { if (LOG.isDebugEnabled()) LOG.debug("{} onFillInterestedFailed {}", this, cause); if (_endPoint.isOpen()) { boolean close = true; if (cause instanceof TimeoutException) close = onReadTimeout(cause); if (close) { if (_endPoint.isOutputShutdown()) _endPoint.close(); else { _endPoint.shutdownOutput(); fillInterested(); } } } }
@Override public final String toString() { return String.format("%s@%h::%s",getClass().getSimpleName(),this,getEndPoint()); }
onFillable(); if (_state.compareAndSet(State.FILLING_INTERESTED,State.INTERESTED)) getEndPoint().fillInterested(_readCallback); break loop;
@Override public void close() { try { if (_endPoint != null) { _endPoint.close(); } } finally { if (_actualConnection != null) { _actualConnection.close(); } } }
@Override public void setInputBufferSize(int inputBufferSize) { if(inputBufferSize < MIN_BUFFER_SIZE) { throw new IllegalArgumentException("Cannot have buffer size less than " + MIN_BUFFER_SIZE); } super.setInputBufferSize(inputBufferSize); }
@Override public void fillInterested() { stats.countFillInterestedEvents.incrementAndGet(); super.fillInterested(); }
@Override public void succeeded() { onFillable(); }
@Override public void run() { try { onFillable(); } finally { while(true) { State state=_state.get(); if (next(state,state.onFilled())) break; } } } };
@Override public void addListener(Listener listener) { if (_actualConnection == null) { _listeners.add(listener); } else { _actualConnection.addListener(listener); } }
@Override public void onOpen() { super.onOpen(); fillInterested(); }
@Override public void setConnection(Connection connection) { if (connection instanceof AbstractConnection) { AbstractConnection a = (AbstractConnection)connection; if (a.getInputBufferSize()<_sslEngine.getSession().getApplicationBufferSize()) a.setInputBufferSize(_sslEngine.getSession().getApplicationBufferSize()); } super.setConnection(connection); }
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint) { connection.setInputBufferSize(getInputBufferSize()); if (connector instanceof ContainerLifeCycle) { ContainerLifeCycle aggregate = (ContainerLifeCycle)connector; for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class)) connection.addListener(listener); } return connection; }