Package org.xbib.elasticsearch.websocket.client

Examples of org.xbib.elasticsearch.websocket.client.WebSocketClient.connect()


                    public void onError(Throwable t) {
                        logger.error(t.getMessage(), t);
                        nodeChannels.remove(websocketNodeAddress);
                    }
                });
                client.connect();
            } else {
                client.send(frame);
            }
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
View Full Code Here


                        @Override
                        public void onMessage(WebSocketClient client, WebSocketFrame frame) {
                            logger.info("frame received: " + frame);
                        }
                    });
            client.connect().await(1000, TimeUnit.MILLISECONDS);           
            Thread.sleep(1000);
            client.send(new CloseWebSocketFrame());
            Thread.sleep(1000);
            client.disconnect();
           
View Full Code Here

                    });
           
            // connect both clients to node
            subscribingClient.connect().await(1000, TimeUnit.MILLISECONDS);           
            publishingClient.connect().await(1000, TimeUnit.MILLISECONDS);           
           
            // wait for publish/subscribe
            Thread.sleep(1000);
           
            // close first client
View Full Code Here

                        @Override
                        public void onError(Throwable t) {
                            logger.error(t.getMessage(), t);
                        }
                    });
            client.connect().await(1000, TimeUnit.MILLISECONDS);           
            Thread.sleep(1000);
            client.send(new CloseWebSocketFrame());
            Thread.sleep(1000);
            client.disconnect();
        } catch (Exception e) {
View Full Code Here

                        @Override
                        public void onError(Throwable t) {
                            logger.error(t.getMessage(), t);
                        }
                    });
            client.connect().await(1000, TimeUnit.MILLISECONDS);
            Thread.sleep(1000);
            logger.info("closing bulk client");
            client.send(new CloseWebSocketFrame());
            Thread.sleep(1000);
            client.disconnect();
View Full Code Here

                        @Override
                        public void onError(Throwable t) {
                            logger.error(t.getMessage(), t);
                        }
                    });
            client.connect().await(1000, TimeUnit.MILLISECONDS);
            Thread.sleep(1000);
            client.send(new CloseWebSocketFrame());
            Thread.sleep(1000);
            client.disconnect();
        } catch (Exception e) {
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.