- 使用 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.XnioExecutor类的一些代码示例,展示了XnioExecutor类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等
本文整理了Java中org.xnio.ssl.XnioSsl类的一些代码示例,展示了XnioSsl类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一
本文整理了Java中org.xnio.XnioExecutor.executeAfter()方法的一些代码示例,展示了XnioExecutor.executeAfter()的具体用法。这些代码示例主要
本文整理了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()的具体用法。这些代码
我正在尝试使用 XNIO 编写服务器。我希望在客户端关闭与服务器的连接时收到通知。 XnioWorker worker = Xnio.getInstance().createWorker(Option
到目前为止,我们使用的是 JBoss AS 7.1,它有一个 tomcat 作为前端服务器。我们现在升级到 Wildfly (JBoss 8.0),它附带 undertow 作为 tomcat 的替代
我将 WildFly 8.2.1 安装在 D:\SOURCE\ProgramsInstalled\wildfly-8.2.1.Final 目录中。我在 Eclipse 之外测试了它,它工作得很好。 我
我正在开发一个 Jenkins 插件,它使用 Codehaus Cargo Java API 管理 EAR 文件到 Java EE 容器的部署,但是我在使用 API 部署到远程 Wildfly 容器时
我已经设置了一个 EJB 客户端,它可以在没有 SSL/TLS 的情况下成功连接到 remote+http://localhost:8080。 现在我已经创建了一个信任库和 keystore ,并按照
我是一名优秀的程序员,十分优秀!