Package org.xbib.elasticsearch.http.netty.client

Examples of org.xbib.elasticsearch.http.netty.client.NettyWebSocketClientFactory.newRequest()


        try {
            final String subscriberId = "oneclient";
            final String topic = "oneclienttest";
            final WebSocketClientFactory clientFactory = new NettyWebSocketClientFactory();
           
            final WebSocketClientRequest subscribe = clientFactory.newRequest()
                    .type("subscribe").data(jsonBuilder().startObject()
                    .field("subscriber", "singleclient")
                    .field("topic", topic).endObject());
           
            final WebSocketClientRequest publish = clientFactory.newRequest()
View Full Code Here


            final WebSocketClientRequest subscribe = clientFactory.newRequest()
                    .type("subscribe").data(jsonBuilder().startObject()
                    .field("subscriber", "singleclient")
                    .field("topic", topic).endObject());
           
            final WebSocketClientRequest publish = clientFactory.newRequest()
                    .type("publish").data(jsonBuilder().startObject()
                    .field("message", "Hello World")
                    .field("topic", topic).endObject());
           
            WebSocketClient client = clientFactory.newClient(getAddressOfNode("1"),
View Full Code Here

        try {
            final String subscriberId = "twoclients";
            final String topic = "twoclienttest";
            final WebSocketClientFactory clientFactory = new NettyWebSocketClientFactory();

            final WebSocketClientRequest subscribe = clientFactory.newRequest()
                    .type("subscribe").data(jsonBuilder().startObject()
                    .field("subscriber", "doubleclient")
                    .field("topic", topic).endObject());
           
            final WebSocketClientRequest publish = clientFactory.newRequest()
View Full Code Here

            final WebSocketClientRequest subscribe = clientFactory.newRequest()
                    .type("subscribe").data(jsonBuilder().startObject()
                    .field("subscriber", "doubleclient")
                    .field("topic", topic).endObject());
           
            final WebSocketClientRequest publish = clientFactory.newRequest()
                    .type("publish").data(jsonBuilder().startObject()
                    .field("message", "Hi there, I'm another client")
                    .field("topic", topic).endObject());
           
            // open first client
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.