Code example for SelectionKey

Methods: channel, interestOps

0
	} 
 
	void setKey (SelectionKey key)
	{ 
		this.key = key;
		channel = key.channel();
		interestOps = key.interestOps();
	} 
 
	SelectionKey key()
	{ 
		return key;
	} 
 
	boolean isDead() 
	{ 
		return dead;
	} 
 
	// Cause the channel to be de-registered from the Selector upon return 
	void die()