Package org.xnio.channels

Examples of org.xnio.channels.ConnectedStreamChannel


        this.instance = instance;
    }

    @Override
    public void exchangeEvent(final HttpServerExchange exchange, final NextListener nextListener) {
        final ConnectedStreamChannel channel = exchange.getConnection().getChannel();
        channel.getCloseSetter().set(new ChannelListener<Channel>() {
            @Override
            public void handleEvent(final Channel channel) {
                try {
                    instance.getInstance().destroy();
                } finally {
View Full Code Here


        handleUpgrade(uri, connection, callback);
    }

    private void handleUpgrade(final URI uri, final HttpClientConnection connection, final HttpClientCallback<WebSocketChannel> callback) {
        try {
            ConnectedStreamChannel channel = connection.performUpgrade();
            callback.completed(new WebSocket13Channel(channel, connection.getBufferPool(), uri.toString(), Collections.<String>emptySet(), true, false));
        } catch (IOException e) {
            callback.failed(e);
        }
View Full Code Here

TOP

Related Classes of org.xnio.channels.ConnectedStreamChannel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.