001package org.xbib.elasticsearch.websocket;
002
003import org.elasticsearch.common.xcontent.XContentBuilder;
004import org.jboss.netty.channel.Channel;
005
006import java.io.IOException;
007
008/**
009 * InteractiveChannel writes responses to a a channel
010 */
011public interface InteractiveChannel {
012
013    Channel getChannel();
014
015    void sendResponse(InteractiveResponse response) throws IOException;
016
017    void sendResponse(String type, Throwable t) throws IOException;
018
019    void sendResponse(String type, XContentBuilder builder) throws IOException;
020}