@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }
@Override public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); if (ctx.getMessage() instanceof FileTransfer) { throw new IllegalStateException("TLS operations not supported with SendFile messages"); } //noinspection SynchronizationOnLocalVariableOrMethodParameter synchronized (connection) { final SSLConnectionContext sslCtx = obtainSslConnectionContext(connection); final SSLEngine sslEngine = sslCtx.getSslEngine(); if (sslEngine != null && !isHandshaking(sslEngine)) { return sslCtx.isServerMode() ? super.handleWrite(ctx) : accurateWrite(ctx, true); } else { if (sslEngine == null || !handshakeContextAttr.isSet(connection)) { handshake(connection, null, null, clientSSLEngineConfigurator, ctx, false); } return accurateWrite(ctx, false); } } }