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 Details

    • 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.