Package org.jcsp.net.cns
Class CNSChannelEndManager
java.lang.Object
org.jcsp.net.cns.CNSChannelEndManager
- All Implemented Interfaces:
NamedChannelEndFactory
,NamedChannelEndManager
This class implements the
NamedChannelEndManager
interface;
providing methods for both constructing and destroying channels.
This implementation uses the standard Channel Name Server. Instances
interact with a local CNSService
through the use of a
CNSUser
object. The default constructor assumes the use
of the default CNS service and obtains the reference itself. The
constructor which takes a CNSUser
object allows the use of
an alternative CNS service. A CNSUser
object can be
obtained by calling a CNSService
object's
getUserObject()
method
(CNSService.getUserObject()
).
For further information see
NamedChannelEndFactory
.- Author:
- Quickstone Technologies Limited
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAny2Net
(String name) Constructs aNetSharedChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name.createAny2Net
(String name, NameAccessLevel accessLevel) Constructs aNetSharedChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name that exists in the supplied namespace.createNet2Any
(String name) Constructs aNetSharedChannelInput
object and registers its location with the supplied name in the global namespace of a channel naming service.createNet2Any
(String name, NameAccessLevel nameAccessLevel) Constructs aNetSharedChannelInput
object and registers its location with the supplied name in specified namespace of a channel naming service.createNet2One
(String name) Constructs aNetAltingChannelInput
object and registers its location with the supplied name in the global namespace of a channel naming service.createNet2One
(String name, NameAccessLevel nameAccessLevel) Constructs aNetAltingChannelInput
object and registers its location with the supplied name in specified namespace of a channel naming service.createOne2Net
(String name) Constructs aNetChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name.createOne2Net
(String name, NameAccessLevel accessLevel) Constructs aNetChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name that exists in the supplied namespace.void
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.
-
Constructor Details
-
CNSChannelEndManager
public CNSChannelEndManager()Constructor for CNSChannelEndManager. -
CNSChannelEndManager
-
-
Method Details
-
createNet2One
Constructs aNetAltingChannelInput
object and registers its location with the supplied name in the global namespace of a channel naming service.- Specified by:
createNet2One
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name against which to register the channel.- Returns:
- the constructed
NetAltingChannelInput
object. - See Also:
-
createNet2One
Constructs aNetAltingChannelInput
object and registers its location with the supplied name in specified namespace of a channel naming service.- Specified by:
createNet2One
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name against which to register the channel.nameAccessLevel
- the namespace in which to register the name.- Returns:
- the constructed
NetAltingChannelInput
object. - See Also:
-
createNet2Any
Constructs aNetSharedChannelInput
object and registers its location with the supplied name in the global namespace of a channel naming service.- Specified by:
createNet2Any
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name against which to register the channel.- Returns:
- the constructed
NetSharedChannelInput
object. - See Also:
-
createNet2Any
Constructs aNetSharedChannelInput
object and registers its location with the supplied name in specified namespace of a channel naming service.- Specified by:
createNet2Any
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name against which to register the channel.nameAccessLevel
- the namespace in which to register the name.- Returns:
- the constructed
NetSharedChannelInput
object. - See Also:
-
createOne2Net
Constructs aNetChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name.- Specified by:
createOne2Net
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name of the channel from which to resolve the location.- Returns:
- the constructed
NetChannelOutput
object. - See Also:
-
createOne2Net
Constructs aNetChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name that exists in the supplied namespace.- Specified by:
createOne2Net
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name of the channel from which to resolve the location.accessLevel
- the namespace in which the channel name exists.- Returns:
- the constructed
NetChannelOutput
object. - See Also:
-
createAny2Net
Constructs aNetSharedChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name.- Specified by:
createAny2Net
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name of the channel from which to resolve the location.- Returns:
- the constructed
NetChannelOutput
object. - See Also:
-
createAny2Net
Constructs aNetSharedChannelOutput
object connected to aNetChannelInput
located at a location resolved from the specified channel name that exists in the supplied namespace.- Specified by:
createAny2Net
in interfaceNamedChannelEndFactory
- Parameters:
name
- the name of the channel from which to resolve the location.accessLevel
- the namespace in which the channel name exists.- Returns:
- the constructed
NetChannelOutput
object. - See Also:
-
destroyChannelEnd
Destroys an individualNetChannelInput
object that was constructed with this instance. This will deregister the channel name and destroy the channel end.- Specified by:
destroyChannelEnd
in interfaceNamedChannelEndManager
- Parameters:
chanInEnd
- the channel end to destroy.- See Also:
-
destroyChannelEnd
Destroys an individualNetChannelOutput
object that was constructed with this instance. This will simply destroy the channel end.- Specified by:
destroyChannelEnd
in interfaceNamedChannelEndManager
- Parameters:
chanInEnd
- the channel end to destroy.- See Also:
-
destroyAllChannelEnds
public void destroyAllChannelEnds()Destroys all channel ends constructed with this instance of the factory.- Specified by:
destroyAllChannelEnds
in interfaceNamedChannelEndManager
- See Also:
-
o.jcsp.net.cns.NamedChannelEndManager#destroyAllChannelEnds()
-