Class SocketChannelContext

java.lang.Object
org.elasticsearch.nio.ChannelContext<SocketChannel>
org.elasticsearch.nio.SocketChannelContext
Direct Known Subclasses:
BytesChannelContext

public abstract class SocketChannelContext extends ChannelContext<SocketChannel>
This context should implement the specific logic for a channel. When a channel receives a notification that it is ready to perform certain operations (read, write, etc) the SocketChannelContext will be called. This context will need to implement all protocol related logic. Additionally, if any special close behavior is required, it should be implemented in this context. The only methods of the context that should ever be called from a non-selector thread are ChannelContext.closeChannel() and sendMessage(Object, BiConsumer).