use of org.xnio.OptionMap.Builder 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());
}
Aggregations