class SslHandler extends ByteToMessageDecoder implements ChannelOutboundHandler {

    @Override
    public void write(final ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
        if (!(msg instanceof ByteBuf)) {
            UnsupportedMessageTypeException exception = new UnsupportedMessageTypeException(msg, ByteBuf.class);
            ReferenceCountUtil.safeRelease(msg);
            promise.setFailure(exception);
        } else if (pendingUnencryptedWrites == null) {
            ReferenceCountUtil.safeRelease(msg);
            promise.setFailure(newPendingWritesNullException());
        } else {
            pendingUnencryptedWrites.add((ByteBuf) msg, promise);
        }
    }

    public  SslHandler(SSLEngine engine);
    public  SslHandler(SSLEngine engine, boolean startTls);
    public  SslHandler(SSLEngine engine, Executor delegatedTaskExecutor);
    public  SslHandler(SSLEngine engine, boolean startTls, Executor delegatedTaskExecutor);

}