CSP for Java
(JCSP) 1.1-rc4

org.jcsp.net.cns
Interface NamedChannelEndManager

All Superinterfaces:
NamedChannelEndFactory
All Known Implementing Classes:
CNSChannelEndManager

public interface NamedChannelEndManager
extends NamedChannelEndFactory

Classes implementing this interface act as factories for constructing NetChannelInput and NetChannelOutput objects (see NamedChannelEndFactory).

They also supply methods for destroying the channel ends created, either an individual end or all constructed so far. The later provides a convenient way for a releasing all org.jcsp.net resources used by a process network. An instance of an implementing class could be passed as parameter around a process network and used to construct all channels. Once the network has terminated the rousources can be released by calling destroyAllChannelEnds().

If an attempt is made to destroy a channel end that was not constructed by the instance of this class that was invoked, then a WrongFactoryException should be thrown.

Author:
Quickstone Technologies Limited

Method Summary
 void destroyAllChannelEnds()
          Destroys all channel ends constructed with this instance of the factory.
 void destroyChannelEnd(NetChannelInput chanInEnd)
          Destroys an individual NetChannelInput object that was constructed with this instance.
 void destroyChannelEnd(NetChannelOutput chanOutEnd)
          Destroys an individual NetChannelOutput object that was constructed with this instance.
 
Methods inherited from interface org.jcsp.net.cns.NamedChannelEndFactory
createAny2Net, createAny2Net, createNet2Any, createNet2Any, createNet2One, createNet2One, createOne2Net, createOne2Net
 

Method Detail

destroyChannelEnd

void destroyChannelEnd(NetChannelInput chanInEnd)
Destroys an individual NetChannelInput object that was constructed with this instance. This will deregister the channel name and destroy the channel end.

Parameters:
chanInEnd - the channel end to destroy.

destroyChannelEnd

void destroyChannelEnd(NetChannelOutput chanOutEnd)
Destroys an individual NetChannelOutput object that was constructed with this instance. This will simply destroy the channel end.

Parameters:
chanOutEnd - the channel end to destroy.

destroyAllChannelEnds

void destroyAllChannelEnds()
Destroys all channel ends constructed with this instance of the factory.


CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.