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
andNetChannelOutput
objects (seeNamedChannelEndFactory
).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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroyAllChannelEnds()
Destroys all channel ends constructed with this instance of the factory.void
destroyChannelEnd(NetChannelInput chanInEnd)
Destroys an individualNetChannelInput
object that was constructed with this instance.void
destroyChannelEnd(NetChannelOutput chanOutEnd)
Destroys an individualNetChannelOutput
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 individualNetChannelInput
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 individualNetChannelOutput
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.
-
-