- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.xnio.ssl.XnioSsl.openSslConnection()
方法的一些代码示例,展示了XnioSsl.openSslConnection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XnioSsl.openSslConnection()
方法的具体详情如下:
包路径:org.xnio.ssl.XnioSsl
类名称:XnioSsl
方法名:openSslConnection
[英]Create an SSL connection to a remote host.
[中]创建到远程主机的SSL连接。
代码示例来源:origin: wildfly/wildfly
/**
* Create an SSL connection to a remote host.
*
* @param ioThread the IO Thread to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param bindListener the bind listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioIoThread ioThread, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap) {
return openSslConnection(ioThread, ANY_INET_ADDRESS, destination, openListener, bindListener, optionMap);
}
代码示例来源:origin: wildfly/wildfly
/**
* Create an SSL connection to a remote host.
*
* @param worker the worker to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
*
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap) {
return openSslConnection(worker, ANY_INET_ADDRESS, destination, openListener, null, optionMap);
}
代码示例来源:origin: wildfly/wildfly
/**
* Create an SSL connection to a remote host.
*
* @param ioThread the IO thread to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
*
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap) {
return openSslConnection(ioThread, ANY_INET_ADDRESS, destination, openListener, null, optionMap);
}
代码示例来源:origin: wildfly/wildfly
/**
* Create an SSL connection to a remote host.
*
* @param worker the worker to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param bindListener the bind listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioWorker worker, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap) {
return openSslConnection(worker, ANY_INET_ADDRESS, destination, openListener, bindListener, optionMap);
}
代码示例来源:origin: wildfly/wildfly
/**
* Create an SSL connection to a remote host.
*
* @param worker the worker to use
* @param bindAddress the local bind address
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioWorker worker, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final OptionMap optionMap) {
return openSslConnection(worker, bindAddress, destination, openListener, null, optionMap);
}
代码示例来源:origin: wildfly/wildfly
/**
* Create an SSL connection to a remote host.
*
* @param ioThread the IO Thread to use
* @param bindAddress the local bind address
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioIoThread ioThread, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final OptionMap optionMap) {
return openSslConnection(ioThread, bindAddress, destination, openListener, null, optionMap);
}
代码示例来源:origin: wildfly/wildfly
@Override
public void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioIoThread ioThread, final XnioSsl ssl, final ByteBufferPool bufferPool, final OptionMap options) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
if(bindAddress == null) {
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
ssl.openSslConnection(ioThread, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), options).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(ioThread, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, options), options).addNotifier(createNotifier(listener), null);
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioWorker worker, final XnioSsl ssl, final ByteBufferPool bufferPool, final OptionMap options) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
if(bindAddress == null) {
ssl.openSslConnection(worker, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), tlsOptions).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(worker, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), tlsOptions).addNotifier(createNotifier(listener), null);
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void connect(ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, URI uri, XnioIoThread ioThread, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options) {
if (uri.getScheme().equals("https")) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
if (bindAddress == null) {
ssl.openSslConnection(ioThread, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, bufferPool, tlsOptions, uri), tlsOptions).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(ioThread, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, bufferPool, tlsOptions, uri), tlsOptions).addNotifier(createNotifier(listener), null);
}
} else {
if (bindAddress == null) {
ioThread.openStreamConnection(new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 80 : uri.getPort()), createOpenListener(listener, bufferPool, options, uri), options).addNotifier(createNotifier(listener), null);
} else {
ioThread.openStreamConnection(bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 80 : uri.getPort()), createOpenListener(listener, bufferPool, options, uri), null, options).addNotifier(createNotifier(listener), null);
}
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void connect(ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, URI uri, XnioWorker worker, XnioSsl ssl, ByteBufferPool bufferPool, OptionMap options) {
if (uri.getScheme().equals("https")) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
if (bindAddress == null) {
ssl.openSslConnection(worker, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, bufferPool, tlsOptions, uri), tlsOptions).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(worker, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, bufferPool, tlsOptions, uri), tlsOptions).addNotifier(createNotifier(listener), null);
}
} else {
if (bindAddress == null) {
worker.openStreamConnection(new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 80 : uri.getPort()), createOpenListener(listener, bufferPool, options, uri), options).addNotifier(createNotifier(listener), null);
} else {
worker.openStreamConnection(bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 80 : uri.getPort()), createOpenListener(listener, bufferPool, options, uri), null, options).addNotifier(createNotifier(listener), null);
}
}
}
代码示例来源:origin: wildfly/wildfly
private IoFuture<T> doUpgrade() {
InetSocketAddress address = new InetSocketAddress(uri.getHost(), uri.getPort());
final ChannelListener<StreamConnection> connectListener = new ConnectionOpenListener();
final String scheme = uri.getScheme();
if (scheme.equals("http")) {
if (bindAddress == null) {
worker.openStreamConnection(address, connectListener, bindListener, optionMap).addNotifier(new FailureNotifier(), null);
} else {
worker.openStreamConnection(bindAddress, address, connectListener, bindListener, optionMap).addNotifier(new FailureNotifier(), null);
}
} else if (scheme.equals("https")) {
if (ssl == null) {
throw msg.missingSslProvider();
}
if (bindAddress == null) {
ssl.openSslConnection(worker, address, connectListener, bindListener, optionMap).addNotifier(new FailureNotifier(), null);
} else {
ssl.openSslConnection(worker, bindAddress, address, connectListener, bindListener, optionMap).addNotifier(new FailureNotifier(), null);
}
} else {
throw msg.invalidURLScheme(scheme);
}
return future.getIoFuture();
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Create an SSL connection to a remote host.
*
* @param worker the worker to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
*
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap) {
return openSslConnection(worker, ANY_INET_ADDRESS, destination, openListener, null, optionMap);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Create an SSL connection to a remote host.
*
* @param ioThread the IO Thread to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param bindListener the bind listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioIoThread ioThread, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap) {
return openSslConnection(ioThread, ANY_INET_ADDRESS, destination, openListener, bindListener, optionMap);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Create an SSL connection to a remote host.
*
* @param ioThread the IO Thread to use
* @param bindAddress the local bind address
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioIoThread ioThread, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final OptionMap optionMap) {
return openSslConnection(ioThread, bindAddress, destination, openListener, null, optionMap);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Create an SSL connection to a remote host.
*
* @param ioThread the IO thread to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param optionMap the option map
*
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap) {
return openSslConnection(ioThread, ANY_INET_ADDRESS, destination, openListener, null, optionMap);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* Create an SSL connection to a remote host.
*
* @param worker the worker to use
* @param destination the destination connection address
* @param openListener the initial open-connection listener
* @param bindListener the bind listener
* @param optionMap the option map
* @return the SSL connection
*/
public IoFuture<SslConnection> openSslConnection(final XnioWorker worker, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap) {
return openSslConnection(worker, ANY_INET_ADDRESS, destination, openListener, bindListener, optionMap);
}
代码示例来源:origin: io.undertow/undertow-core
@Override
public void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioWorker worker, final XnioSsl ssl, final ByteBufferPool bufferPool, final OptionMap options) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
if(bindAddress == null) {
ssl.openSslConnection(worker, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), tlsOptions).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(worker, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), tlsOptions).addNotifier(createNotifier(listener), null);
}
}
代码示例来源:origin: io.undertow/undertow-core
@Override
public void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioIoThread ioThread, final XnioSsl ssl, final ByteBufferPool bufferPool, final OptionMap options) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
if(bindAddress == null) {
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
ssl.openSslConnection(ioThread, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), options).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(ioThread, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, options), options).addNotifier(createNotifier(listener), null);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioIoThread ioThread, final XnioSsl ssl, final ByteBufferPool bufferPool, final OptionMap options) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
if(bindAddress == null) {
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
ssl.openSslConnection(ioThread, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), options).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(ioThread, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, options), options).addNotifier(createNotifier(listener), null);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public void connect(final ClientCallback<ClientConnection> listener, InetSocketAddress bindAddress, final URI uri, final XnioWorker worker, final XnioSsl ssl, final ByteBufferPool bufferPool, final OptionMap options) {
if (ssl == null) {
listener.failed(UndertowMessages.MESSAGES.sslWasNull());
return;
}
OptionMap tlsOptions = OptionMap.builder().addAll(options).set(Options.SSL_STARTTLS, true).getMap();
if(bindAddress == null) {
ssl.openSslConnection(worker, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), tlsOptions).addNotifier(createNotifier(listener), null);
} else {
ssl.openSslConnection(worker, bindAddress, new InetSocketAddress(uri.getHost(), uri.getPort() == -1 ? 443 : uri.getPort()), createOpenListener(listener, uri, ssl, bufferPool, tlsOptions), tlsOptions).addNotifier(createNotifier(listener), null);
}
}
本文整理了Java中org.xnio.ssl.XnioSsl.createSslConnectionServer()方法的一些代码示例,展示了XnioSsl.createSslConnectionSe
本文整理了Java中org.xnio.ssl.XnioSsl.connectSsl()方法的一些代码示例,展示了XnioSsl.connectSsl()的具体用法。这些代码示例主要来源于Github/
本文整理了Java中org.xnio.ssl.XnioSsl.openSslConnection()方法的一些代码示例,展示了XnioSsl.openSslConnection()的具体用法。这些代码
我是一名优秀的程序员,十分优秀!