/** * Construct a new instance. * * @param sslChannel the SSL channel * @param source the source * @param sink the sink */ public AssembledConnectedSslStreamChannel(final SslChannel sslChannel, final StreamSourceChannel source, final StreamSinkChannel sink) { super(sslChannel, source, sink); this.sslChannel = sslChannel; handshakeSetter = ChannelListeners.getDelegatingSetter(sslChannel.getHandshakeSetter(), this); }
public ChannelListener.Setter<? extends AcceptingChannel<ConnectedStreamChannel>> getAcceptSetter() { return ChannelListeners.getDelegatingSetter(server.getAcceptSetter(), this); }
public ChannelListener.Setter<? extends AcceptingChannel<ConnectedStreamChannel>> getCloseSetter() { return ChannelListeners.getDelegatingSetter(server.getCloseSetter(), this); }
/** * Construct a new instance. At least one side must be an SSL channel. * * @param readChannel the read channel * @param writeChannel the write channel */ public AssembledSslChannel(final SuspendableReadChannel readChannel, final SuspendableWriteChannel writeChannel) { super(readChannel, writeChannel); if (readChannel instanceof SslChannel) { sslChannel = (SslChannel) readChannel; } else if (writeChannel instanceof SslChannel) { sslChannel = (SslChannel) writeChannel; } else { throw msg.oneChannelMustBeSSL(); } handshakeSetter = ChannelListeners.getDelegatingSetter(sslChannel.getHandshakeSetter(), this); }
/** * Construct a new instance. * * @param closeable the single central closeable channel * @param source the stream source channel * @param sink the stream sink channel */ public AssembledStreamChannel(final CloseableChannel closeable, final StreamSourceChannel source, final StreamSinkChannel sink) { if (source.getWorker() != sink.getWorker() || source.getWorker() != closeable.getWorker()) { throw msg.differentWorkers(); } this.closeable = closeable; this.source = source; this.sink = sink; readSetter = ChannelListeners.getDelegatingSetter(source.getReadSetter(), this); writeSetter = ChannelListeners.getDelegatingSetter(sink.getWriteSetter(), this); closeSetter = ChannelListeners.getDelegatingSetter(closeable.getCloseSetter(), this); }
/** * Construct a new instance. * * @param closeable the single central closeable channel * @param readable the read channel * @param writable the write channel */ public AssembledMessageChannel(final CloseableChannel closeable, final ReadableMessageChannel readable, final WritableMessageChannel writable) { if (readable.getWorker() != writable.getWorker() || readable.getWorker() != closeable.getWorker()) { throw msg.differentWorkers(); } this.closeable = closeable; this.readable = readable; this.writable = writable; readSetter = ChannelListeners.getDelegatingSetter(readable.getReadSetter(), this); writeSetter = ChannelListeners.getDelegatingSetter(writable.getWriteSetter(), this); closeSetter = ChannelListeners.getDelegatingSetter(closeable.getCloseSetter(), this); }
AbstractAcceptingSslChannel(final SSLContext sslContext, final AcceptingChannel<? extends S> tcpServer, final OptionMap optionMap, final Pool<ByteBuffer> socketBufferPool, final Pool<ByteBuffer> applicationBufferPool, final boolean startTls) { this.tcpServer = tcpServer; this.sslContext = sslContext; this.socketBufferPool = socketBufferPool; this.applicationBufferPool = applicationBufferPool; this.startTls = startTls; clientAuthMode = optionMap.get(Options.SSL_CLIENT_AUTH_MODE); useClientMode = optionMap.get(Options.SSL_USE_CLIENT_MODE, false) ? 1 : 0; enableSessionCreation = optionMap.get(Options.SSL_ENABLE_SESSION_CREATION, true) ? 1 : 0; final Sequence<String> enabledCipherSuites = optionMap.get(Options.SSL_ENABLED_CIPHER_SUITES); cipherSuites = enabledCipherSuites != null ? enabledCipherSuites.toArray(new String[enabledCipherSuites.size()]) : null; final Sequence<String> enabledProtocols = optionMap.get(Options.SSL_ENABLED_PROTOCOLS); protocols = enabledProtocols != null ? enabledProtocols.toArray(new String[enabledProtocols.size()]) : null; //noinspection ThisEscapedInObjectConstruction closeSetter = ChannelListeners.<AcceptingChannel<C>>getDelegatingSetter(tcpServer.getCloseSetter(), this); //noinspection ThisEscapedInObjectConstruction acceptSetter = ChannelListeners.<AcceptingChannel<C>>getDelegatingSetter(tcpServer.getAcceptSetter(), this); }
UndertowAcceptingSslChannel(final UndertowXnioSsl ssl, final AcceptingChannel<? extends StreamConnection> tcpServer, final OptionMap optionMap, final ByteBufferPool applicationBufferPool, final boolean startTls) { this.tcpServer = tcpServer; this.ssl = ssl; this.applicationBufferPool = applicationBufferPool; this.startTls = startTls; clientAuthMode = optionMap.get(Options.SSL_CLIENT_AUTH_MODE); useClientMode = optionMap.get(Options.SSL_USE_CLIENT_MODE, false) ? 1 : 0; enableSessionCreation = optionMap.get(Options.SSL_ENABLE_SESSION_CREATION, true) ? 1 : 0; final Sequence<String> enabledCipherSuites = optionMap.get(Options.SSL_ENABLED_CIPHER_SUITES); cipherSuites = enabledCipherSuites != null ? enabledCipherSuites.toArray(new String[enabledCipherSuites.size()]) : null; final Sequence<String> enabledProtocols = optionMap.get(Options.SSL_ENABLED_PROTOCOLS); protocols = enabledProtocols != null ? enabledProtocols.toArray(new String[enabledProtocols.size()]) : null; //noinspection ThisEscapedInObjectConstruction closeSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getCloseSetter(), this); //noinspection ThisEscapedInObjectConstruction acceptSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getAcceptSetter(), this); useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false); }
/** * Construct a new instance. * * @param sslChannel the SSL channel * @param source the source * @param sink the sink */ public AssembledConnectedSslStreamChannel(final SslChannel sslChannel, final StreamSourceChannel source, final StreamSinkChannel sink) { super(sslChannel, source, sink); this.sslChannel = sslChannel; handshakeSetter = ChannelListeners.getDelegatingSetter(sslChannel.getHandshakeSetter(), this); }
public ChannelListener.Setter<? extends AcceptingChannel<ConnectedStreamChannel>> getAcceptSetter() { return ChannelListeners.getDelegatingSetter(server.getAcceptSetter(), this); }
public ChannelListener.Setter<? extends AcceptingChannel<ConnectedStreamChannel>> getCloseSetter() { return ChannelListeners.getDelegatingSetter(server.getCloseSetter(), this); }
/** * Construct a new instance. At least one side must be an SSL channel. * * @param readChannel the read channel * @param writeChannel the write channel */ public AssembledSslChannel(final SuspendableReadChannel readChannel, final SuspendableWriteChannel writeChannel) { super(readChannel, writeChannel); if (readChannel instanceof SslChannel) { sslChannel = (SslChannel) readChannel; } else if (writeChannel instanceof SslChannel) { sslChannel = (SslChannel) writeChannel; } else { throw msg.oneChannelMustBeSSL(); } handshakeSetter = ChannelListeners.getDelegatingSetter(sslChannel.getHandshakeSetter(), this); }
/** * Construct a new instance. * * @param closeable the single central closeable channel * @param source the stream source channel * @param sink the stream sink channel */ public AssembledStreamChannel(final CloseableChannel closeable, final StreamSourceChannel source, final StreamSinkChannel sink) { if (source.getWorker() != sink.getWorker() || source.getWorker() != closeable.getWorker()) { throw msg.differentWorkers(); } this.closeable = closeable; this.source = source; this.sink = sink; readSetter = ChannelListeners.getDelegatingSetter(source.getReadSetter(), this); writeSetter = ChannelListeners.getDelegatingSetter(sink.getWriteSetter(), this); closeSetter = ChannelListeners.getDelegatingSetter(closeable.getCloseSetter(), this); }
/** * Construct a new instance. * * @param closeable the single central closeable channel * @param readable the read channel * @param writable the write channel */ public AssembledMessageChannel(final CloseableChannel closeable, final ReadableMessageChannel readable, final WritableMessageChannel writable) { if (readable.getWorker() != writable.getWorker() || readable.getWorker() != closeable.getWorker()) { throw msg.differentWorkers(); } this.closeable = closeable; this.readable = readable; this.writable = writable; readSetter = ChannelListeners.getDelegatingSetter(readable.getReadSetter(), this); writeSetter = ChannelListeners.getDelegatingSetter(writable.getWriteSetter(), this); closeSetter = ChannelListeners.getDelegatingSetter(closeable.getCloseSetter(), this); }
AbstractAcceptingSslChannel(final SSLContext sslContext, final AcceptingChannel<? extends S> tcpServer, final OptionMap optionMap, final Pool<ByteBuffer> socketBufferPool, final Pool<ByteBuffer> applicationBufferPool, final boolean startTls) { this.tcpServer = tcpServer; this.sslContext = sslContext; this.socketBufferPool = socketBufferPool; this.applicationBufferPool = applicationBufferPool; this.startTls = startTls; clientAuthMode = optionMap.get(Options.SSL_CLIENT_AUTH_MODE); useClientMode = optionMap.get(Options.SSL_USE_CLIENT_MODE, false) ? 1 : 0; enableSessionCreation = optionMap.get(Options.SSL_ENABLE_SESSION_CREATION, true) ? 1 : 0; final Sequence<String> enabledCipherSuites = optionMap.get(Options.SSL_ENABLED_CIPHER_SUITES); cipherSuites = enabledCipherSuites != null ? enabledCipherSuites.toArray(new String[enabledCipherSuites.size()]) : null; final Sequence<String> enabledProtocols = optionMap.get(Options.SSL_ENABLED_PROTOCOLS); protocols = enabledProtocols != null ? enabledProtocols.toArray(new String[enabledProtocols.size()]) : null; //noinspection ThisEscapedInObjectConstruction closeSetter = ChannelListeners.<AcceptingChannel<C>>getDelegatingSetter(tcpServer.getCloseSetter(), this); //noinspection ThisEscapedInObjectConstruction acceptSetter = ChannelListeners.<AcceptingChannel<C>>getDelegatingSetter(tcpServer.getAcceptSetter(), this); }
UndertowAcceptingSslChannel(final UndertowXnioSsl ssl, final AcceptingChannel<? extends StreamConnection> tcpServer, final OptionMap optionMap, final ByteBufferPool applicationBufferPool, final boolean startTls) { this.tcpServer = tcpServer; this.ssl = ssl; this.applicationBufferPool = applicationBufferPool; this.startTls = startTls; clientAuthMode = optionMap.get(Options.SSL_CLIENT_AUTH_MODE); useClientMode = optionMap.get(Options.SSL_USE_CLIENT_MODE, false) ? 1 : 0; enableSessionCreation = optionMap.get(Options.SSL_ENABLE_SESSION_CREATION, true) ? 1 : 0; final Sequence<String> enabledCipherSuites = optionMap.get(Options.SSL_ENABLED_CIPHER_SUITES); cipherSuites = enabledCipherSuites != null ? enabledCipherSuites.toArray(new String[enabledCipherSuites.size()]) : null; final Sequence<String> enabledProtocols = optionMap.get(Options.SSL_ENABLED_PROTOCOLS); protocols = enabledProtocols != null ? enabledProtocols.toArray(new String[enabledProtocols.size()]) : null; //noinspection ThisEscapedInObjectConstruction closeSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getCloseSetter(), this); //noinspection ThisEscapedInObjectConstruction acceptSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getAcceptSetter(), this); useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false); }
UndertowAcceptingSslChannel(final UndertowXnioSsl ssl, final AcceptingChannel<? extends StreamConnection> tcpServer, final OptionMap optionMap, final ByteBufferPool applicationBufferPool, final boolean startTls) { this.tcpServer = tcpServer; this.ssl = ssl; this.applicationBufferPool = applicationBufferPool; this.startTls = startTls; clientAuthMode = optionMap.get(Options.SSL_CLIENT_AUTH_MODE); useClientMode = optionMap.get(Options.SSL_USE_CLIENT_MODE, false) ? 1 : 0; enableSessionCreation = optionMap.get(Options.SSL_ENABLE_SESSION_CREATION, true) ? 1 : 0; final Sequence<String> enabledCipherSuites = optionMap.get(Options.SSL_ENABLED_CIPHER_SUITES); cipherSuites = enabledCipherSuites != null ? enabledCipherSuites.toArray(new String[enabledCipherSuites.size()]) : null; final Sequence<String> enabledProtocols = optionMap.get(Options.SSL_ENABLED_PROTOCOLS); protocols = enabledProtocols != null ? enabledProtocols.toArray(new String[enabledProtocols.size()]) : null; //noinspection ThisEscapedInObjectConstruction closeSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getCloseSetter(), this); //noinspection ThisEscapedInObjectConstruction acceptSetter = ChannelListeners.<AcceptingChannel<SslConnection>>getDelegatingSetter(tcpServer.getAcceptSetter(), this); useCipherSuitesOrder = optionMap.get(UndertowOptions.SSL_USER_CIPHER_SUITES_ORDER, false); }