- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.xnio.ssl.XnioSsl
类的一些代码示例,展示了XnioSsl
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XnioSsl
类的具体详情如下:
包路径:org.xnio.ssl.XnioSsl
类名称:XnioSsl
[英]An SSL provider for XNIO.
[中]
代码示例来源: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
*/
@Deprecated
public IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap) {
return connectSsl(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 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
@Override
protected void startListening(XnioWorker worker, InetSocketAddress socketAddress, ChannelListener<AcceptingChannel<StreamConnection>> acceptListener) throws IOException {
if(proxyProtocol) {
sslServer = worker.createStreamConnectionServer(socketAddress, (ChannelListener) acceptListener, getSSLOptions(sslContextSupplier.get()));
} else {
XnioSsl ssl = getSsl();
sslServer = ssl.createSslConnectionServer(worker, socketAddress, (ChannelListener) acceptListener, getSSLOptions(sslContextSupplier.get()));
}
sslServer.resumeAccepts();
final InetSocketAddress boundAddress = sslServer.getLocalAddress(InetSocketAddress.class);
UndertowLogger.ROOT_LOGGER.listenerStarted("HTTPS", getName(), NetworkUtils.formatIPAddressForURI(boundAddress.getAddress()), boundAddress.getPort());
}
代码示例来源:origin: org.jboss.remoting3/jboss-remoting
public AcceptingChannel<? extends ConnectedStreamChannel> createServer(final SocketAddress bindAddress, final OptionMap optionMap, final ServerAuthenticationProvider authenticationProvider, XnioSsl xnioSsl) throws IOException {
final AccessControlContext accessControlContext = AccessController.getContext();
final boolean sslCapable = sslEnabled;
final AcceptListener acceptListener = new AcceptListener(optionMap, authenticationProvider, accessControlContext);
final AcceptingChannel<? extends ConnectedStreamChannel> result;
if (sslCapable && optionMap.get(Options.SSL_ENABLED, true)) {
if (xnioSsl == null) {
try {
xnioSsl = xnio.getSslProvider(optionMap);
} catch (GeneralSecurityException e) {
throw sslConfigFailure(e);
}
}
result = xnioSsl.createSslTcpServer(xnioWorker, (InetSocketAddress) bindAddress, acceptListener, optionMap);
} else {
result = xnioWorker.createStreamServer(bindAddress, acceptListener, optionMap);
}
addCloseHandler(new CloseHandler<ConnectionProvider>() {
public void handleClose(final ConnectionProvider closed, final IOException exception) {
IoUtils.safeClose(result);
}
});
result.resumeAccepts();
return result;
}
}
代码示例来源:origin: org.jboss.eap/wildfly-undertow
@Override
protected void startListening(XnioWorker worker, InetSocketAddress socketAddress, ChannelListener<AcceptingChannel<StreamConnection>> acceptListener) throws IOException {
if(proxyProtocol) {
sslServer = worker.createStreamConnectionServer(socketAddress, (ChannelListener) acceptListener, getSSLOptions(sslContextSupplier.get()));
} else {
XnioSsl ssl = getSsl();
sslServer = ssl.createSslConnectionServer(worker, socketAddress, (ChannelListener) acceptListener, getSSLOptions(sslContextSupplier.get()));
}
sslServer.resumeAccepts();
final InetSocketAddress boundAddress = sslServer.getLocalAddress(InetSocketAddress.class);
UndertowLogger.ROOT_LOGGER.listenerStarted("HTTPS", getName(), NetworkUtils.formatIPAddressForURI(boundAddress.getAddress()), boundAddress.getPort());
}
代码示例来源: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: org.wildfly/wildfly-undertow
@Override
protected void startListening(XnioWorker worker, InetSocketAddress socketAddress, ChannelListener<AcceptingChannel<StreamConnection>> acceptListener) throws IOException {
if(proxyProtocol) {
sslServer = worker.createStreamConnectionServer(socketAddress, (ChannelListener) acceptListener, getSSLOptions(sslContextSupplier.get()));
} else {
XnioSsl ssl = getSsl();
sslServer = ssl.createSslConnectionServer(worker, socketAddress, (ChannelListener) acceptListener, getSSLOptions(sslContextSupplier.get()));
}
sslServer.resumeAccepts();
final InetSocketAddress boundAddress = sslServer.getLocalAddress(InetSocketAddress.class);
UndertowLogger.ROOT_LOGGER.listenerStarted("HTTPS", getName(), NetworkUtils.formatIPAddressForURI(boundAddress.getAddress()), boundAddress.getPort());
}
代码示例来源: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
*/
@Deprecated
public IoFuture<ConnectedSslStreamChannel> connectSsl(final XnioWorker worker, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super ConnectedSslStreamChannel> openListener, final OptionMap optionMap) {
return connectSsl(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 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: actframework/actframework
@Override
protected void setUpClient(NetworkHandler client, int port, boolean secure) throws IOException {
HttpHandler handler = new ActHttpHandler(client);
ByteBufferPool buffers = new DefaultByteBufferPool(true, 16 * 1024, -1, 4);
HttpOpenListener openListener = new HttpOpenListener(buffers, serverOptions);
openListener.setRootHandler(handler);
ChannelListener<AcceptingChannel<StreamConnection>> acceptListener = ChannelListeners.openListenerAdapter(openListener);
if (!secure) {
AcceptingChannel<? extends StreamConnection> server = worker.createStreamConnectionServer(new InetSocketAddress(port), acceptListener, socketOptions);
server.resumeAccepts();
channels.add(server);
} else {
XnioSsl xnioSsl;
try {
SSLContext sslContext = createSSLContext(loadKeyStore("server.keystore"), loadKeyStore("server.truststore"));
xnioSsl = new UndertowXnioSsl(xnio, OptionMap.create(Options.USE_DIRECT_BUFFERS, true), sslContext);
AcceptingChannel<SslConnection> sslServer = xnioSsl.createSslConnectionServer(worker, new InetSocketAddress(port), (ChannelListener)acceptListener, socketOptions);
sslServer.resumeAccepts();
channels.add(sslServer);
} catch (Exception e) {
throw E.unexpected(e);
}
}
}
代码示例来源: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
*/
@Deprecated
public IoFuture<ConnectedSslStreamChannel> connectSsl(final XnioWorker worker, final InetSocketAddress destination, final ChannelListener<? super ConnectedSslStreamChannel> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap) {
return connectSsl(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 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: org.actframework/act
@Override
protected void setUpClient(NetworkHandler client, int port, boolean secure) throws IOException {
HttpHandler handler = new ActHttpHandler(client);
ByteBufferPool buffers = new DefaultByteBufferPool(true, 16 * 1024, -1, 4);
HttpOpenListener openListener = new HttpOpenListener(buffers, serverOptions);
openListener.setRootHandler(handler);
ChannelListener<AcceptingChannel<StreamConnection>> acceptListener = ChannelListeners.openListenerAdapter(openListener);
if (!secure) {
AcceptingChannel<? extends StreamConnection> server = worker.createStreamConnectionServer(new InetSocketAddress(port), acceptListener, socketOptions);
server.resumeAccepts();
channels.add(server);
} else {
XnioSsl xnioSsl;
try {
SSLContext sslContext = createSSLContext(loadKeyStore("server.keystore"), loadKeyStore("server.truststore"));
xnioSsl = new UndertowXnioSsl(xnio, OptionMap.create(Options.USE_DIRECT_BUFFERS, true), sslContext);
AcceptingChannel<SslConnection> sslServer = xnioSsl.createSslConnectionServer(worker, new InetSocketAddress(port), (ChannelListener)acceptListener, socketOptions);
sslServer.resumeAccepts();
channels.add(sslServer);
} catch (Exception e) {
throw E.unexpected(e);
}
}
}
代码示例来源:origin: org.jboss.remoting3/jboss-remoting
protected IoFuture<ConnectedSslStreamChannel> createSslConnection(final SocketAddress bindAddress, final InetSocketAddress destination, final OptionMap connectOptions, final XnioSsl xnioSsl, final ChannelListener<ConnectedStreamChannel> openListener) {
return bindAddress == null ? xnioSsl.connectSsl(xnioWorker, destination, openListener, connectOptions) : xnioSsl.connectSsl(xnioWorker, (InetSocketAddress) bindAddress, destination, openListener, connectOptions);
}
代码示例来源: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-core
public void start() {
try {
OptionMap.Builder serverOptionsBuilder = OptionMap.builder()
.set(Options.TCP_NODELAY, true)
.set(Options.REUSE_ADDRESSES, true);
ChannelListener acceptListener = ChannelListeners.openListenerAdapter(openListener);
if (httpAddress != null) {
normalServer = worker.createStreamConnectionServer(httpAddress, acceptListener, serverOptionsBuilder.getMap());
normalServer.resumeAccepts();
}
if (secureAddress != null) {
if (sslClientAuthMode != null) {
serverOptionsBuilder.set(SSL_CLIENT_AUTH_MODE, sslClientAuthMode);
}
OptionMap secureOptions = serverOptionsBuilder.getMap();
XnioSsl xnioSsl = new UndertowXnioSsl(worker.getXnio(), secureOptions, sslContext);
secureServer = xnioSsl.createSslConnectionServer(worker, secureAddress, acceptListener, secureOptions);
secureServer.resumeAccepts();
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
/**
* 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
*/
@Deprecated
public IoFuture<ConnectedSslStreamChannel> connectSsl(final XnioWorker worker, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super ConnectedSslStreamChannel> openListener, final OptionMap optionMap) {
return connectSsl(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: 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
*/
@Deprecated
public IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap) {
return connectSsl(worker, ANY_INET_ADDRESS, destination, openListener, null, optionMap);
}
代码示例来源: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);
}
}
本文整理了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 ,并按照
我是一名优秀的程序员,十分优秀!