Code example for SelectionKey

Methods: interestOps

0
		key.interestOps(SelectionKey.OP_WRITE);
 
	} 
 
	public void pause() { 
		key.interestOps(SelectionKey.OP_READ);
	} 
 
	public void stop() { 
		ChannelProcessor channelProcessor = (ChannelProcessor) key.attachment();
		channelProcessor.close(key);
	} 
 
	public void clear() { 
		ChannelProcessor channelProcessor = (ChannelProcessor) key.attachment();
		if (channelProcessor instanceof ClearableChannelProcessor) {
			((ClearableChannelProcessor) channelProcessor).clear(key);
		} 
	} 
 
	public void change(ChannelProcessor processor) {