Code example for SelectionKey

Methods: channel, isValid