Search in sources :

Example 1 with Sequence

use of org.xnio.Sequence in project wildfly by wildfly.

the class HttpsListenerService method startListening.

@Override
protected void startListening(XnioWorker worker, InetSocketAddress socketAddress, ChannelListener<AcceptingChannel<StreamConnection>> acceptListener) throws IOException {
    SSLContext sslContext = sslContextSupplier.get();
    Builder builder = OptionMap.builder().addAll(commonOptions);
    builder.addAll(socketOptions);
    builder.set(Options.USE_DIRECT_BUFFERS, true);
    if (cipherSuites != null) {
        String[] cipherList = CipherSuiteSelector.fromString(cipherSuites).evaluate(sslContext.getSupportedSSLParameters().getCipherSuites());
        builder.setSequence((Option<Sequence<String>>) HttpsListenerResourceDefinition.ENABLED_CIPHER_SUITES.getOption(), cipherList);
    }
    OptionMap combined = builder.getMap();
    XnioSsl xnioSsl = new UndertowXnioSsl(worker.getXnio(), combined, sslContext);
    sslServer = xnioSsl.createSslConnectionServer(worker, socketAddress, (ChannelListener) acceptListener, combined);
    sslServer.resumeAccepts();
    UndertowLogger.ROOT_LOGGER.listenerStarted("HTTPS", getName(), NetworkUtils.formatIPAddressForURI(socketAddress.getAddress()), socketAddress.getPort());
}
Also used : ChannelListener(org.xnio.ChannelListener) XnioSsl(org.xnio.ssl.XnioSsl) UndertowXnioSsl(io.undertow.protocols.ssl.UndertowXnioSsl) Builder(org.xnio.OptionMap.Builder) OptionMap(org.xnio.OptionMap) SSLContext(javax.net.ssl.SSLContext) Sequence(org.xnio.Sequence) UndertowXnioSsl(io.undertow.protocols.ssl.UndertowXnioSsl)

Aggregations

UndertowXnioSsl (io.undertow.protocols.ssl.UndertowXnioSsl)1 SSLContext (javax.net.ssl.SSLContext)1 ChannelListener (org.xnio.ChannelListener)1 OptionMap (org.xnio.OptionMap)1 Builder (org.xnio.OptionMap.Builder)1 Sequence (org.xnio.Sequence)1 XnioSsl (org.xnio.ssl.XnioSsl)1