protected SslConnection newSslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine engine) { return new SslConnection(byteBufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption()); }
/** * @return the SSLEngine associated to the TLS handshake event */ public SSLEngine getSSLEngine() { return (SSLEngine)getSource(); } }
@Override public Object getTransport() { return getEndPoint(); }
@Override public void close() { getDecryptedEndPoint().getConnection().close(); }
@Override public InvocationType getInvocationType() { return getDecryptedEndPoint().getFillInterest().getCallbackInvocationType(); } };
@Override public boolean isOutputShutdown() { return isOutboundDone() || getEndPoint().isOutputShutdown(); }
@Override public boolean isInputShutdown() { return getEndPoint().isInputShutdown() || isInboundDone(); }
public SslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine sslEngine, boolean useDirectBuffersForEncryption, boolean useDirectBuffersForDecryption) { // This connection does not execute calls to onFillable(), so they will be called by the selector thread. // onFillable() does not block and will only wakeup another thread to do the actual reading and handling. super(endPoint, executor); this._bufferPool = byteBufferPool; this._sslEngine = sslEngine; this._decryptedEndPoint = newDecryptedEndPoint(); this._encryptedDirectBuffers = useDirectBuffersForEncryption; this._decryptedDirectBuffers = useDirectBuffersForDecryption; }
private void ensureFillInterested() { if (!SslConnection.this.isFillInterested()) SslConnection.this.fillInterested(); }
@Override public void failed(final Throwable x) { onFillInterestedFailed(x); }
@Override public void succeeded() { onFillable(); }
@Override public boolean onIdleExpired() { return getDecryptedEndPoint().getConnection().onIdleExpired(); }
@Override public InvocationType getInvocationType() { return getDecryptedEndPoint().getFillInterest().getCallbackInvocationType(); }
protected SslConnection newSslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine engine) { return new SslConnection(byteBufferPool, executor, endPoint, engine, isDirectBuffersForEncryption(), isDirectBuffersForDecryption()); }
@Override public Object getTransport() { return getEndPoint(); }
public SslConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, SSLEngine sslEngine) { // This connection does not execute calls to onfillable, so they will be called by the selector thread. // onfillable does not block and will only wakeup another thread to do the actual reading and handling. super(endPoint, executor, !EXECUTE_ONFILLABLE); this._bufferPool = byteBufferPool; this._sslEngine = sslEngine; this._decryptedEndPoint = newDecryptedEndPoint(); }
@Override public void failed(final Throwable x) { onFillInterestedFailed(x); }
@Override public void close() { getDecryptedEndPoint().getConnection().close(); }
@Override public void close() { getDecryptedEndPoint().getConnection().close(); }
@Override public boolean onIdleExpired() { return getDecryptedEndPoint().getConnection().onIdleExpired(); }