Package org.xbib.elasticsearch.http.netty

Examples of org.xbib.elasticsearch.http.netty.NettyInteractiveResponse


                    .setScroll(scrollTimeout)
                    .execute().actionGet();
            for (SearchHit hit : searchResponse.getHits()) {
                Long timestamp = (Long) hit.field("timestamp").getValues().get(0);
                Map<String, Object> data = hit.field("data").getValue();
                channel.write(new NettyInteractiveResponse("message", createPublishMessage(timestamp, data)).response());
            }
            if (searchResponse.getHits().hits().length == 0) {
                break;
            }
        }
View Full Code Here


        Map<String, Object> m = request.asMap();
        Integer id = (Integer) m.get("channel");
        Channel ch = transport.channel(id);
        try {
            if (ch != null) {
                ch.write(new NettyInteractiveResponse("message", (Map<String, Object>) m.get("message")).response());
                // don't send a success message back to the channel
            } else {
                // delivery failed, channel not present
                channel.sendResponse(TYPE, new IOException("channel " + id + " gone"));
            }
View Full Code Here

        return this;
    }

    @Override
    public void send(WebSocketClient client) throws IOException {
        client.send(new NettyInteractiveResponse(super.type, super.builder).response());
    }
View Full Code Here

                    SearchHitField channelField = hit.field("subscriber.channel");
                    Map<String, Object> channelfieldMap = channelField.getValue();
                    Integer id = (Integer) channelfieldMap.get("id");
                    Channel ch = transport.channel(id);
                    if (ch != null) {
                        ch.write(new NettyInteractiveResponse("message", messageBuilder).response());
                    }
                }
                if (searchResponse.getHits().hits().length == 0) {
                    break;
                }
View Full Code Here

TOP

Related Classes of org.xbib.elasticsearch.http.netty.NettyInteractiveResponse

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.