Closes the channel. For most implementations, this will be be an asynchronous process. For this
reason, this method does not throw IOException There is no guarantee that the channel
will be closed when this method returns. Use the addCloseListener(ActionListener) method
to implement logic that depends on knowing when the channel is closed.
Adds a listener that will be executed when the channel is closed. If the channel is still open when
this listener is added, the listener will be executed by the thread that eventually closes the
channel. If the channel is already closed when the listener is added the listener will immediately be
executed by the thread that is attempting to add the listener.