Search in sources :

Example 1 with Cancellable

use of org.xnio.Cancellable in project wildfly-core by wildfly.

the class ConnectSyncUnitTestCase method getConfiguration.

private static ProtocolConnectionConfiguration getConfiguration(IoFuture.Status initialStatus, boolean completeOnRecheck, boolean failOnRecheck) {
    final FutureResult<Connection> futureResult = new FutureResult<>();
    // It seems you need to add a cancel handler if you want a
    // call to futureResult.getIoFuture().cancel() to trigger a change in the future to State.CANCELLED.
    // So add one so we can test whether cancel() has been called.
    futureResult.addCancelHandler(new Cancellable() {

        public Cancellable cancel() {
            futureResult.setCancelled();
            return this;
        }
    });
    final MockConnection connection = initialStatus == IoFuture.Status.DONE || completeOnRecheck ? new MockConnection() : null;
    final TestTimeoutHandler timeoutHandler = new TestTimeoutHandler(futureResult, initialStatus, connection, failOnRecheck);
    final MockEndpoint endpoint = new MockEndpoint(futureResult);
    ProtocolConnectionConfiguration result = ProtocolConnectionConfiguration.create(endpoint, URI.create("http://127.0.0.1"));
    result.setTimeoutHandler(timeoutHandler);
    return result;
}
Also used : FutureResult(org.xnio.FutureResult) Cancellable(org.xnio.Cancellable) ProtocolConnectionConfiguration(org.jboss.as.protocol.ProtocolConnectionConfiguration) Connection(org.jboss.remoting3.Connection)

Example 2 with Cancellable

use of org.xnio.Cancellable in project OpenUnison by TremoloSecurity.

the class ConnectionBuilder method connectImpl.

private IoFuture<WebSocketChannel> connectImpl(final URI uri, final FutureResult<WebSocketChannel> ioFuture, final int redirectCount) {
    WebSocketLogger.REQUEST_LOGGER.debugf("Opening websocket connection to %s", uri);
    final String scheme = uri.getScheme().equals("wss") ? "https" : "http";
    final URI newUri;
    try {
        newUri = new URI(scheme, uri.getUserInfo(), uri.getHost(), uri.getPort() == -1 ? (uri.getScheme().equals("wss") ? 443 : 80) : uri.getPort(), uri.getPath().isEmpty() ? "/" : uri.getPath(), uri.getQuery(), uri.getFragment());
    } catch (URISyntaxException e) {
        throw new RuntimeException(e);
    }
    final WebSocketClientHandshake handshake = WebSocketClientHandshake.create(version, newUri, clientNegotiation, clientExtensions);
    final Map<String, String> originalHeaders = handshake.createHeaders();
    originalHeaders.put(Headers.HOST_STRING, uri.getHost() + ":" + newUri.getPort());
    final Map<String, List<String>> headers = new HashMap<>();
    for (Map.Entry<String, String> entry : originalHeaders.entrySet()) {
        List<String> list = new ArrayList<>();
        list.add(entry.getValue());
        headers.put(entry.getKey(), list);
    }
    headers.putAll(this.additionalHeaders);
    if (clientNegotiation != null) {
        clientNegotiation.beforeRequest(headers);
    }
    InetSocketAddress toBind = bindAddress;
    String sysBind = System.getProperty(WebSocketClient.BIND_PROPERTY);
    if (toBind == null && sysBind != null) {
        toBind = new InetSocketAddress(sysBind, 0);
    }
    if (proxyUri != null) {
        UndertowClient.getInstance().connect(new ClientCallback<ClientConnection>() {

            @Override
            public void completed(final ClientConnection connection) {
                int port = uri.getPort() > 0 ? uri.getPort() : uri.getScheme().equals("https") || uri.getScheme().equals("wss") ? 443 : 80;
                ClientRequest cr = new ClientRequest().setMethod(Methods.CONNECT).setPath(uri.getHost() + ":" + port).setProtocol(Protocols.HTTP_1_1);
                cr.getRequestHeaders().put(Headers.HOST, proxyUri.getHost() + ":" + (proxyUri.getPort() > 0 ? proxyUri.getPort() : 80));
                connection.sendRequest(cr, new ClientCallback<ClientExchange>() {

                    @Override
                    public void completed(ClientExchange result) {
                        result.setResponseListener(new ClientCallback<ClientExchange>() {

                            @Override
                            public void completed(ClientExchange response) {
                                try {
                                    if (response.getResponse().getResponseCode() == 200) {
                                        try {
                                            StreamConnection targetConnection = connection.performUpgrade();
                                            WebSocketLogger.REQUEST_LOGGER.debugf("Established websocket connection to %s", uri);
                                            if (uri.getScheme().equals("wss") || uri.getScheme().equals("https")) {
                                                handleConnectionWithExistingConnection(((UndertowXnioSsl) ssl).wrapExistingConnection(targetConnection, optionMap));
                                            } else {
                                                handleConnectionWithExistingConnection(targetConnection);
                                            }
                                        } catch (IOException e) {
                                            ioFuture.setException(e);
                                        } catch (Exception e) {
                                            ioFuture.setException(new IOException(e));
                                        }
                                    } else {
                                        ioFuture.setException(UndertowMessages.MESSAGES.proxyConnectionFailed(response.getResponse().getResponseCode()));
                                    }
                                } catch (Exception e) {
                                    ioFuture.setException(new IOException(e));
                                }
                            }

                            private void handleConnectionWithExistingConnection(StreamConnection targetConnection) {
                                final IoFuture<?> result;
                                result = HttpUpgrade.performUpgrade(targetConnection, newUri, headers, new WebsocketConnectionListener(optionMap, handshake, newUri, ioFuture), handshake.handshakeChecker(newUri, headers));
                                result.addNotifier(new IoFuture.Notifier<Object, Object>() {

                                    @Override
                                    public void notify(IoFuture<?> res, Object attachment) {
                                        if (res.getStatus() == IoFuture.Status.FAILED) {
                                            ioFuture.setException(res.getException());
                                        }
                                    }
                                }, null);
                                ioFuture.addCancelHandler(new Cancellable() {

                                    @Override
                                    public Cancellable cancel() {
                                        result.cancel();
                                        return null;
                                    }
                                });
                            }

                            @Override
                            public void failed(IOException e) {
                                ioFuture.setException(e);
                            }
                        });
                    }

                    @Override
                    public void failed(IOException e) {
                        ioFuture.setException(e);
                    }
                });
            }

            @Override
            public void failed(IOException e) {
                ioFuture.setException(e);
            }
        }, bindAddress, proxyUri, worker, proxySsl, bufferPool, optionMap);
    } else {
        final IoFuture<?> result;
        if (ssl != null) {
            result = HttpUpgrade.performUpgrade(worker, ssl, toBind, newUri, headers, new WebsocketConnectionListener(optionMap, handshake, newUri, ioFuture), null, optionMap, handshake.handshakeChecker(newUri, headers));
        } else {
            result = HttpUpgrade.performUpgrade(worker, toBind, newUri, headers, new WebsocketConnectionListener(optionMap, handshake, newUri, ioFuture), null, optionMap, handshake.handshakeChecker(newUri, headers));
        }
        result.addNotifier(new IoFuture.Notifier<Object, Object>() {

            @Override
            public void notify(IoFuture<?> res, Object attachment) {
                if (res.getStatus() == IoFuture.Status.FAILED) {
                    IOException exception = res.getException();
                    if (exception instanceof RedirectException) {
                        if (redirectCount == MAX_REDIRECTS) {
                            ioFuture.setException(UndertowMessages.MESSAGES.tooManyRedirects(exception));
                        } else {
                            String path = ((RedirectException) exception).getLocation();
                            try {
                                connectImpl(new URI(path), ioFuture, redirectCount + 1);
                            } catch (URISyntaxException e) {
                                ioFuture.setException(new IOException(e));
                            }
                        }
                    } else {
                        ioFuture.setException(exception);
                    }
                }
            }
        }, null);
        ioFuture.addCancelHandler(new Cancellable() {

            @Override
            public Cancellable cancel() {
                result.cancel();
                return null;
            }
        });
    }
    return ioFuture.getIoFuture();
}
Also used : ClientExchange(io.undertow.client.ClientExchange) ClientCallback(io.undertow.client.ClientCallback) HashMap(java.util.HashMap) InetSocketAddress(java.net.InetSocketAddress) Cancellable(org.xnio.Cancellable) ArrayList(java.util.ArrayList) IoFuture(org.xnio.IoFuture) URISyntaxException(java.net.URISyntaxException) URI(java.net.URI) ArrayList(java.util.ArrayList) List(java.util.List) ClientConnection(io.undertow.client.ClientConnection) ClientRequest(io.undertow.client.ClientRequest) WebSocketClientHandshake(io.undertow.websockets.client.WebSocketClientHandshake) IOException(java.io.IOException) StreamConnection(org.xnio.StreamConnection) RedirectException(org.xnio.http.RedirectException) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) UndertowXnioSsl(io.undertow.protocols.ssl.UndertowXnioSsl) HashMap(java.util.HashMap) OptionMap(org.xnio.OptionMap) Map(java.util.Map) RedirectException(org.xnio.http.RedirectException)

Example 3 with Cancellable

use of org.xnio.Cancellable in project jboss-remoting by jboss-remoting.

the class EndpointImpl method connect.

IoFuture<Connection> connect(final URI destination, final SocketAddress bindAddress, final OptionMap connectOptions, final AuthenticationConfiguration configuration, final SSLContext sslContext) {
    Assert.checkNotNullParam("destination", destination);
    Assert.checkNotNullParam("connectOptions", connectOptions);
    final String protocol = AUTH_CONFIGURATION_CLIENT.getSaslProtocol(configuration) != null ? AUTH_CONFIGURATION_CLIENT.getSaslProtocol(configuration) : connectOptions.contains(RemotingOptions.SASL_PROTOCOL) ? connectOptions.get(RemotingOptions.SASL_PROTOCOL) : RemotingOptions.DEFAULT_SASL_PROTOCOL;
    UnaryOperator<SaslClientFactory> factoryOperator = factory -> new ProtocolSaslClientFactory(factory, protocol);
    if (connectOptions.contains(RemotingOptions.SERVER_NAME)) {
        final String serverName = connectOptions.get(RemotingOptions.SERVER_NAME);
        factoryOperator = and(factoryOperator, factory -> new ServerNameSaslClientFactory(factory, serverName));
    }
    final SecurityManager sm = System.getSecurityManager();
    if (sm != null) {
        sm.checkPermission(RemotingPermission.CONNECT);
    }
    final String scheme = AUTH_CONFIGURATION_CLIENT.getRealProtocol(destination, configuration);
    synchronized (connectionLock) {
        boolean ok = false;
        try {
            resourceUntick("Connection to " + destination);
        } catch (NotOpenException e) {
            return new FailedIoFuture<>(e);
        }
        try {
            final ProtocolRegistration protocolRegistration = connectionProviders.get(scheme);
            if (protocolRegistration == null) {
                return new FailedIoFuture<>(new UnknownURISchemeException("No connection provider for URI scheme \"" + scheme + "\" is installed"));
            }
            final ConnectionProvider connectionProvider = protocolRegistration.getProvider();
            final FutureResult<Connection> futureResult = new FutureResult<Connection>(getExecutor());
            // Mark the stack because otherwise debugging connect problems can be incredibly tough
            final StackTraceElement[] mark = Thread.currentThread().getStackTrace();
            final UnaryOperator<SaslClientFactory> finalFactoryOperator = factoryOperator;
            final Result<ConnectionHandlerFactory> result = new Result<ConnectionHandlerFactory>() {

                private final AtomicBoolean flag = new AtomicBoolean();

                public boolean setCancelled() {
                    if (!flag.compareAndSet(false, true)) {
                        return false;
                    }
                    log.logf(getClass().getName(), Logger.Level.TRACE, null, "Registered cancellation result");
                    closeTick1("a cancelled connection");
                    futureResult.setCancelled();
                    return true;
                }

                public boolean setException(final IOException exception) {
                    if (!flag.compareAndSet(false, true)) {
                        return false;
                    }
                    log.logf(getClass().getName(), Logger.Level.TRACE, exception, "Registered exception result");
                    closeTick1("a failed connection (2)");
                    SpiUtils.glueStackTraces(exception, mark, 1, "asynchronous invocation");
                    futureResult.setException(exception);
                    return true;
                }

                public boolean setResult(final ConnectionHandlerFactory connHandlerFactory) {
                    if (!flag.compareAndSet(false, true)) {
                        return false;
                    }
                    synchronized (connectionLock) {
                        log.logf(getClass().getName(), Logger.Level.TRACE, null, "Registered successful result %s", connHandlerFactory);
                        final ConnectionImpl connection = new ConnectionImpl(EndpointImpl.this, connHandlerFactory, protocolRegistration.getContext(), destination, null, configuration, protocol);
                        connections.add(connection);
                        connection.getConnectionHandler().addCloseHandler(SpiUtils.asyncClosingCloseHandler(connection));
                        connection.addCloseHandler(resourceCloseHandler);
                        connection.addCloseHandler(connectionCloseHandler);
                        // see if we were closed in the meantime
                        if (EndpointImpl.this.isCloseFlagSet()) {
                            connection.closeAsync();
                            futureResult.setCancelled();
                        } else {
                            futureResult.setResult(connection);
                        }
                    }
                    return true;
                }
            };
            final Cancellable connect;
            if (System.getSecurityManager() == null)
                connect = connectionProvider.connect(destination, bindAddress, connectOptions, result, configuration, sslContext, finalFactoryOperator, Collections.emptyList());
            else
                connect = doPrivileged((PrivilegedAction<Cancellable>) () -> connectionProvider.connect(destination, bindAddress, connectOptions, result, configuration, sslContext, finalFactoryOperator, Collections.emptyList()));
            ok = true;
            futureResult.addCancelHandler(connect);
            return futureResult.getIoFuture();
        } finally {
            if (!ok) {
                closeTick1("a failed connection (1)");
            }
        }
    }
}
Also used : FailedIoFuture(org.xnio.FailedIoFuture) SSLContext(javax.net.ssl.SSLContext) SocketAddress(java.net.SocketAddress) AbstractHandleableCloseable(org.jboss.remoting3.spi.AbstractHandleableCloseable) URISyntaxException(java.net.URISyntaxException) AccessController.doPrivileged(java.security.AccessController.doPrivileged) UnaryOperator(java.util.function.UnaryOperator) OptionMap(org.xnio.OptionMap) GeneralSecurityException(java.security.GeneralSecurityException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RemotingPermission(org.jboss.remoting3.security.RemotingPermission) IoUtils.safeClose(org.xnio.IoUtils.safeClose) Map(java.util.Map) URI(java.net.URI) ConnectionProvider(org.jboss.remoting3.spi.ConnectionProvider) ServerNameSaslClientFactory(org.wildfly.security.sasl.util.ServerNameSaslClientFactory) Assert(org.wildfly.common.Assert) IoFuture(org.xnio.IoFuture) IdentityHashMap(java.util.IdentityHashMap) Predicate(java.util.function.Predicate) SpiUtils(org.jboss.remoting3.spi.SpiUtils) ConnectionHandlerFactory(org.jboss.remoting3.spi.ConnectionHandlerFactory) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) ServiceLoader(java.util.ServiceLoader) ObjectName(javax.management.ObjectName) PrivilegedAction(java.security.PrivilegedAction) InetSocketAddress(java.net.InetSocketAddress) AuthenticationContextConfigurationClient(org.wildfly.security.auth.client.AuthenticationContextConfigurationClient) SaslAuthenticationFactory(org.wildfly.security.auth.server.sasl.SaslAuthenticationFactory) Options(org.xnio.Options) List(java.util.List) ProtocolSaslClientFactory(org.wildfly.security.sasl.util.ProtocolSaslClientFactory) AuthenticationContext(org.wildfly.security.auth.client.AuthenticationContext) Messages(org.jboss.remoting3._private.Messages) AuthenticationException(org.wildfly.security.auth.AuthenticationException) Pattern(java.util.regex.Pattern) SaslClientFactory(javax.security.sasl.SaslClientFactory) ConnectionHandlerContext(org.jboss.remoting3.spi.ConnectionHandlerContext) AtomicIntegerFieldUpdater(java.util.concurrent.atomic.AtomicIntegerFieldUpdater) AuthenticationConfiguration(org.wildfly.security.auth.client.AuthenticationConfiguration) Xnio(org.xnio.Xnio) Logger(org.jboss.logging.Logger) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) ConcurrentMap(java.util.concurrent.ConcurrentMap) RejectedExecutionException(java.util.concurrent.RejectedExecutionException) Result(org.xnio.Result) MBeanServer(javax.management.MBeanServer) Bits(org.xnio.Bits) ManagementFactory(java.lang.management.ManagementFactory) RegisteredService(org.jboss.remoting3.spi.RegisteredService) ConnectionProviderFactory(org.jboss.remoting3.spi.ConnectionProviderFactory) Executor(java.util.concurrent.Executor) XnioWorker(org.xnio.XnioWorker) IOException(java.io.IOException) HttpUpgradeConnectionProviderFactory(org.jboss.remoting3.remote.HttpUpgradeConnectionProviderFactory) Cancellable(org.xnio.Cancellable) ConnectionProviderContext(org.jboss.remoting3.spi.ConnectionProviderContext) FutureResult(org.xnio.FutureResult) RemoteConnectionProviderFactory(org.jboss.remoting3.remote.RemoteConnectionProviderFactory) Collections(java.util.Collections) ConnectionHandlerFactory(org.jboss.remoting3.spi.ConnectionHandlerFactory) Cancellable(org.xnio.Cancellable) ProtocolSaslClientFactory(org.wildfly.security.sasl.util.ProtocolSaslClientFactory) ConnectionProvider(org.jboss.remoting3.spi.ConnectionProvider) Result(org.xnio.Result) FutureResult(org.xnio.FutureResult) FutureResult(org.xnio.FutureResult) ServerNameSaslClientFactory(org.wildfly.security.sasl.util.ServerNameSaslClientFactory) ServerNameSaslClientFactory(org.wildfly.security.sasl.util.ServerNameSaslClientFactory) ProtocolSaslClientFactory(org.wildfly.security.sasl.util.ProtocolSaslClientFactory) SaslClientFactory(javax.security.sasl.SaslClientFactory) IOException(java.io.IOException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) FailedIoFuture(org.xnio.FailedIoFuture)

Example 4 with Cancellable

use of org.xnio.Cancellable in project jboss-remoting by jboss-remoting.

the class RemoteConnectionProvider method connect.

public Cancellable connect(final URI destination, final SocketAddress bindAddress, final OptionMap connectOptions, final Result<ConnectionHandlerFactory> result, final AuthenticationConfiguration authenticationConfiguration, final SSLContext sslContext, final UnaryOperator<SaslClientFactory> saslClientFactoryOperator, final Collection<String> serverMechs) {
    if (!isOpen()) {
        throw new IllegalStateException("Connection provider is closed");
    }
    Assert.checkNotNullParam("destination", destination);
    Assert.checkNotNullParam("connectOptions", connectOptions);
    Assert.checkNotNullParam("result", result);
    Assert.checkNotNullParam("authenticationConfiguration", authenticationConfiguration);
    Assert.checkNotNullParam("saslClientFactoryOperator", saslClientFactoryOperator);
    if (sslRequired)
        Assert.checkNotNullParam("sslContext", sslContext);
    log.tracef("Attempting to connect to \"%s\" with options %s", destination, connectOptions);
    // cancellable that will be returned by this method
    final FutureResult<ConnectionHandlerFactory> cancellableResult = new FutureResult<ConnectionHandlerFactory>();
    cancellableResult.addCancelHandler(new Cancellable() {

        @Override
        public Cancellable cancel() {
            cancellableResult.setCancelled();
            return this;
        }
    });
    final IoFuture<ConnectionHandlerFactory> returnedFuture = cancellableResult.getIoFuture();
    returnedFuture.addNotifier(IoUtils.<ConnectionHandlerFactory>resultNotifier(), result);
    final boolean useSsl = sslRequired || connectOptions.get(Options.SSL_ENABLED, true);
    final ChannelListener<StreamConnection> openListener = new ChannelListener<StreamConnection>() {

        public void handleEvent(final StreamConnection connection) {
            try {
                connection.setOption(Options.TCP_NODELAY, Boolean.TRUE);
            } catch (IOException e) {
            // ignore
            }
            final SslChannel sslChannel = connection instanceof SslChannel ? (SslChannel) connection : null;
            final RemoteConnection remoteConnection = new RemoteConnection(connection, sslChannel, connectOptions, RemoteConnectionProvider.this);
            cancellableResult.addCancelHandler(new Cancellable() {

                @Override
                public Cancellable cancel() {
                    RemoteConnectionHandler.sendCloseRequestBody(remoteConnection);
                    remoteConnection.handlePreAuthCloseRequest();
                    return this;
                }
            });
            if (connection.isOpen()) {
                remoteConnection.setResult(cancellableResult);
                connection.getSinkChannel().setWriteListener(remoteConnection.getWriteListener());
                final ClientConnectionOpenListener openListener = new ClientConnectionOpenListener(destination, remoteConnection, connectionProviderContext, authenticationConfiguration, saslClientFactoryOperator, serverMechs, connectOptions);
                openListener.handleEvent(connection.getSourceChannel());
            }
        }
    };
    final AuthenticationContextConfigurationClient configurationClient = ClientConnectionOpenListener.AUTH_CONFIGURATION_CLIENT;
    final InetSocketAddress address = configurationClient.getDestinationInetSocketAddress(destination, authenticationConfiguration, 0);
    final IoFuture<? extends StreamConnection> future;
    if (useSsl) {
        future = createSslConnection(destination, (InetSocketAddress) bindAddress, address, connectOptions, authenticationConfiguration, sslContext, openListener);
    } else {
        future = createConnection(destination, (InetSocketAddress) bindAddress, address, connectOptions, openListener);
    }
    pendingInboundConnections.add(returnedFuture);
    // if the connection fails, we need to propagate that
    future.addNotifier(new IoFuture.HandlingNotifier<StreamConnection, FutureResult<ConnectionHandlerFactory>>() {

        public void handleFailed(final IOException exception, final FutureResult<ConnectionHandlerFactory> attachment) {
            attachment.setException(exception);
        }

        public void handleCancelled(final FutureResult<ConnectionHandlerFactory> attachment) {
            attachment.setCancelled();
        }
    }, cancellableResult);
    returnedFuture.addNotifier(new IoFuture.HandlingNotifier<ConnectionHandlerFactory, IoFuture<ConnectionHandlerFactory>>() {

        public void handleCancelled(IoFuture<ConnectionHandlerFactory> attachment) {
            pendingInboundConnections.remove(attachment);
            future.cancel();
        }

        public void handleFailed(final IOException exception, IoFuture<ConnectionHandlerFactory> attachment) {
            pendingInboundConnections.remove(attachment);
        }

        public void handleDone(final ConnectionHandlerFactory data, IoFuture<ConnectionHandlerFactory> attachment) {
            pendingInboundConnections.remove(attachment);
        }
    }, returnedFuture);
    return returnedFuture;
}
Also used : ChannelListener(org.xnio.ChannelListener) AuthenticationContextConfigurationClient(org.wildfly.security.auth.client.AuthenticationContextConfigurationClient) ConnectionHandlerFactory(org.jboss.remoting3.spi.ConnectionHandlerFactory) Cancellable(org.xnio.Cancellable) InetSocketAddress(java.net.InetSocketAddress) SslChannel(org.xnio.channels.SslChannel) IoFuture(org.xnio.IoFuture) IOException(java.io.IOException) StreamConnection(org.xnio.StreamConnection) JsseSslStreamConnection(org.xnio.ssl.JsseSslStreamConnection) FutureResult(org.xnio.FutureResult)

Example 5 with Cancellable

use of org.xnio.Cancellable in project jboss-remoting by jboss-remoting.

the class RemoteConnectionProvider method closeAction.

protected void closeAction() {
    try {
        final Cancellable[] cancellables;
        synchronized (pendingInboundConnections) {
            cancellables = pendingInboundConnections.toArray(new Cancellable[pendingInboundConnections.size()]);
            pendingInboundConnections.clear();
        }
        for (Cancellable pendingConnection : cancellables) {
            pendingConnection.cancel();
        }
        closeComplete();
    } finally {
        if (server != null && objectName != null) {
            try {
                server.unregisterMBean(objectName);
            } catch (Throwable ignored) {
            }
        }
    }
}
Also used : Cancellable(org.xnio.Cancellable)

Aggregations

Cancellable (org.xnio.Cancellable)9 FutureResult (org.xnio.FutureResult)6 IOException (java.io.IOException)5 InetSocketAddress (java.net.InetSocketAddress)3 AtomicReference (java.util.concurrent.atomic.AtomicReference)3 IoFuture (org.xnio.IoFuture)3 URI (java.net.URI)2 URISyntaxException (java.net.URISyntaxException)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 ConnectionHandlerFactory (org.jboss.remoting3.spi.ConnectionHandlerFactory)2 AuthenticationException (org.wildfly.security.auth.AuthenticationException)2 AuthenticationContextConfigurationClient (org.wildfly.security.auth.client.AuthenticationContextConfigurationClient)2 AnonymousPrincipal (org.wildfly.security.auth.principal.AnonymousPrincipal)2 OptionMap (org.xnio.OptionMap)2 StreamConnection (org.xnio.StreamConnection)2 ClientCallback (io.undertow.client.ClientCallback)1 ClientConnection (io.undertow.client.ClientConnection)1 ClientExchange (io.undertow.client.ClientExchange)1