next up previous contents
Next: Building Blocks Up: Channel Previous: Disconnecting from a channel   Contents

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.



Bela Ban 2002-11-16