next up previous contents
Next: Setting options Up: Channels Previous: Disconnecting from a channel

Closing a channel

To destroy a channel instance (destroy the associated protocol stack, and release all resources), method Close is used:

        public void Close();

It moves the channel to the closed state, in which no further operations are allowed (most throw an exception when invoked on a closed channel). In this state, a channel instance is not considered used any longer by an application and - when the reference to the instance is reset - the channel essentially only lingers around until it is garbage collected by the Java runtime system.




1999-12-13