Class InputReconnectionManagerCNSImpl

  • All Implemented Interfaces:
    java.io.Serializable, InputReconnectionManager

    class InputReconnectionManagerCNSImpl
    extends java.lang.Object
    implements InputReconnectionManager
    Implementation of the InputReconnectionManager to work with a CNS service for resolution of the channel's current location.
    • Field Detail

      • channelFactoryClass

        java.lang.Class channelFactoryClass
        The factory class used to create the channel end.
      • cnsServiceNameToUse

        private java.lang.String cnsServiceNameToUse
        Identification of the CNS service to use.
      • cnsRegisteredName

        private java.lang.String cnsRegisteredName
        Name registered with the CNS.
      • cnsRegisteredNameAccessLevel

        private NameAccessLevel cnsRegisteredNameAccessLevel
        NameAccessLevel used to register the name against with the CNS.
      • key

        private ChannelNameKey key
        The name key allocated to the channel.
      • serializable

        private transient boolean serializable
        True if the channel end has been prepared for serialization (migration).
      • cnsNetChannelLocation

        private transient NetChannelLocation cnsNetChannelLocation
        Current location of the channel.
      • MSG_CHAN_SERIALIZABLE

        private static final int MSG_CHAN_SERIALIZABLE
        Constant for representing a possible channel state.
        See Also:
        Constant Field Values
      • MSG_CHAN_NETWORKED

        private static final int MSG_CHAN_NETWORKED
        Constant for representing a possible channel state.
        See Also:
        Constant Field Values
      • MSG_TERMINATE

        private static final int MSG_TERMINATE
        Constant for representing a possible channel state.
        See Also:
        Constant Field Values
      • anonymousCnsNamePrefix

        static final java.lang.String anonymousCnsNamePrefix
        Unique prefix to use when registering channels with the CNS. It is assumed that only the reconnection managers will be using channels with names of this form.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InputReconnectionManagerCNSImpl

        public InputReconnectionManagerCNSImpl​(NetAltingChannelInput chanIn)
        Constructs a new InputReconnectionManagerCNSImpl for use with the given input channel. The default CNS service name will be used.
        Parameters:
        chanIn - the input channel end.
      • InputReconnectionManagerCNSImpl

        public InputReconnectionManagerCNSImpl​(NetAltingChannelInput chanIn,
                                               java.lang.String cnsServiceName)
        Constructs a new InputReconnectionManagerCNSImpl for use with the given input channel and a specific CNS service.
        Parameters:
        chanIn - the input channel end.
        cnsServiceName - name of the CNS service to use.
      • InputReconnectionManagerCNSImpl

        public InputReconnectionManagerCNSImpl​(NetAltingChannelInput chanIn,
                                               java.lang.String name,
                                               NameAccessLevel accessLevel,
                                               ChannelNameKey key)
        Constructs a new InputReconnectionManagerCNSImpl for use with CNS registered channels using NameAccessLevel application isolation. The default CNS service name is used.
        Parameters:
        chanIn - the input channel end.
        name - the CNS registered name of the channel.
        accessLevel - the application isolation level.
        key - the allocated channel key.
      • InputReconnectionManagerCNSImpl

        public InputReconnectionManagerCNSImpl​(NetAltingChannelInput chanIn,
                                               java.lang.String name,
                                               NameAccessLevel accessLevel,
                                               ChannelNameKey key,
                                               java.lang.String cnsServiceName)
        Constructs a new InputReconnectionManagerCNSImpl for use with CNS registered channels.
        Parameters:
        chanIn - the input channel end.
        name - the CNS registered name of the channel.
        accessLevel - the application isolation level.
        key - the allocated channel key.
        cnsServiceName - name of the CNS service to use.
    • Method Detail

      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Serialization method to write this object to a stream.
        Parameters:
        out - destination stream to serialize to.
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Serialization method to read this object from a stream.
        Parameters:
        in - the source stream.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException