public class CNSChannelEndManager extends java.lang.Object implements NamedChannelEndManager
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.NamedChannelEndFactory,
NamedChannelEndManager,
CNSService| Modifier and Type | Class and Description |
|---|---|
private static class |
CNSChannelEndManager.ChannelRegistration |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Hashtable |
channelInputRegistrations |
private java.util.Hashtable |
channelOutputsCreated |
private CNSUser |
cnsUser |
private NetChannelEndFactory |
factoryToUse |
| Constructor and Description |
|---|
CNSChannelEndManager()
Constructor for CNSChannelEndManager.
|
CNSChannelEndManager(CNSUser cnsUser) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkCnsService() |
NetSharedChannelOutput |
createAny2Net(java.lang.String name)
Constructs a
NetSharedChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name. |
NetSharedChannelOutput |
createAny2Net(java.lang.String name,
NameAccessLevel accessLevel)
Constructs a
NetSharedChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name that exists in the supplied
namespace. |
NetSharedChannelInput |
createNet2Any(java.lang.String name)
Constructs a
NetSharedChannelInput object and
registers its location with the supplied name in the global namespace
of a channel naming service. |
NetSharedChannelInput |
createNet2Any(java.lang.String name,
NameAccessLevel nameAccessLevel)
Constructs a
NetSharedChannelInput object and
registers its location with the supplied name in specified
namespace of a channel naming service. |
NetAltingChannelInput |
createNet2One(java.lang.String name)
Constructs a
NetAltingChannelInput object and
registers its location with the supplied name in the global namespace
of a channel naming service. |
NetAltingChannelInput |
createNet2One(java.lang.String name,
NameAccessLevel nameAccessLevel)
Constructs a
NetAltingChannelInput object and
registers its location with the supplied name in specified
namespace of a channel naming service. |
NetChannelOutput |
createOne2Net(java.lang.String name)
Constructs a
NetChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name. |
NetChannelOutput |
createOne2Net(java.lang.String name,
NameAccessLevel accessLevel)
Constructs a
NetChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name that exists in the supplied
namespace. |
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. |
private java.util.Hashtable channelInputRegistrations
private java.util.Hashtable channelOutputsCreated
private CNSUser cnsUser
private NetChannelEndFactory factoryToUse
public CNSChannelEndManager()
public CNSChannelEndManager(CNSUser cnsUser)
private void checkCnsService()
public NetAltingChannelInput createNet2One(java.lang.String name)
NetAltingChannelInput object and
registers its location with the supplied name in the global namespace
of a channel naming service.createNet2One in interface NamedChannelEndFactoryname - the name against which to register the channel.NetAltingChannelInput object.NamedChannelEndFactory.createNet2One(String)public NetAltingChannelInput createNet2One(java.lang.String name, NameAccessLevel nameAccessLevel)
NetAltingChannelInput object and
registers its location with the supplied name in specified
namespace of a channel naming service.createNet2One in interface NamedChannelEndFactoryname - the name against which to register the channel.nameAccessLevel - the namespace in which to register the name.NetAltingChannelInput object.NamedChannelEndFactory.createNet2One(String, NameAccessLevel)public NetSharedChannelInput createNet2Any(java.lang.String name)
NetSharedChannelInput object and
registers its location with the supplied name in the global namespace
of a channel naming service.createNet2Any in interface NamedChannelEndFactoryname - the name against which to register the channel.NetSharedChannelInput object.NamedChannelEndFactory.createNet2Any(String)public NetSharedChannelInput createNet2Any(java.lang.String name, NameAccessLevel nameAccessLevel)
NetSharedChannelInput object and
registers its location with the supplied name in specified
namespace of a channel naming service.createNet2Any in interface NamedChannelEndFactoryname - the name against which to register the channel.nameAccessLevel - the namespace in which to register the name.NetSharedChannelInput object.NamedChannelEndFactory.createNet2Any(String, NameAccessLevel)public NetChannelOutput createOne2Net(java.lang.String name)
NetChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name.createOne2Net in interface NamedChannelEndFactoryname - the name of the channel from which to resolve the location.NetChannelOutput object.NamedChannelEndFactory.createOne2Net(String)public NetChannelOutput createOne2Net(java.lang.String name, NameAccessLevel accessLevel)
NetChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name that exists in the supplied
namespace.createOne2Net in interface NamedChannelEndFactoryname - the name of the channel from which to resolve the location.accessLevel - the namespace in which the channel name exists.NetChannelOutput object.NamedChannelEndFactory.createOne2Net(String, NameAccessLevel)public NetSharedChannelOutput createAny2Net(java.lang.String name)
NetSharedChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name.createAny2Net in interface NamedChannelEndFactoryname - the name of the channel from which to resolve the location.NetChannelOutput object.NamedChannelEndFactory.createAny2Net(String)public NetSharedChannelOutput createAny2Net(java.lang.String name, NameAccessLevel accessLevel)
NetSharedChannelOutput object connected
to a NetChannelInput located at a location
resolved from the specified channel name that exists in the supplied
namespace.createAny2Net in interface NamedChannelEndFactoryname - the name of the channel from which to resolve the location.accessLevel - the namespace in which the channel name exists.NetChannelOutput object.NamedChannelEndFactory.createAny2Net(String, NameAccessLevel)public void destroyChannelEnd(NetChannelInput chanInEnd)
NetChannelInput object
that was constructed with this instance. This will deregister
the channel name and destroy the channel end.destroyChannelEnd in interface NamedChannelEndManagerchanInEnd - the channel end to destroy.NamedChannelEndManager.destroyChannelEnd(NetChannelInput)public void destroyChannelEnd(NetChannelOutput chanOutEnd)
NetChannelOutput object
that was constructed with this instance. This will simply
destroy the channel end.destroyChannelEnd in interface NamedChannelEndManagerchanInEnd - the channel end to destroy.NamedChannelEndManager.destroyChannelEnd(NetChannelOutput)public void destroyAllChannelEnds()
destroyAllChannelEnds in interface NamedChannelEndManagero.jcsp.net.cns.NamedChannelEndManager#destroyAllChannelEnds()