Class MigratableAltingChannelInputImpl

    • Field Detail

      • actualIn

        private transient NetAltingChannelInput actualIn
        The actual channel input. This should not be read from. Use the filteredIn channel.
      • filteredIn

        private transient FilteredChannelInput filteredIn
        A filtered channel input wrapper that wraps the actualIn channel.
      • filters

        private java.util.Vector filters
        A Vector of Filter objects that is used during serialization.
    • Constructor Detail

      • MigratableAltingChannelInputImpl

        public MigratableAltingChannelInputImpl​(NetAltingChannelInput in)
        Constructor for MigratableAltingChannelInputImpl. This takes a NetAltingChannelInput and constructs a default InputReconnectionManager object and then uses the constructor taking a single InputReconnectionManager object. MigratableAltingChannelInputImpl objects constructed with this constructor make use of the default channel name service.
        Parameters:
        in - the actual NetAltingChannelInput object to use.
      • MigratableAltingChannelInputImpl

        public MigratableAltingChannelInputImpl​(InputReconnectionManager mgr)
        Constructs a new MigratableAltingChannelInputImpl with a specified reconnection manager object. This should have been given the channel when it was constructed.
        Parameters:
        mgr - the reconnection manager.
    • Method Detail

      • addReadFilter

        public void addReadFilter​(Filter filter)
        Description copied from interface: ReadFiltered
        Installs a read filter defining a transformation to be applied by the read method of the channel end. The filter will be appended to the end of the current list, making it the last to be applied.
        Parameters:
        filter - the filter to be installed; may not be null.
        See Also:
        ReadFiltered.addReadFilter(Filter)
      • addReadFilter

        public void addReadFilter​(Filter filter,
                                  int index)
        Description copied from interface: ReadFiltered
        Installs a read filter defining a transformation to be applied by the read method of the channel end at a specific index. If there is already a filter at that index position the existing filters are shifted to make room. If the index is greater than the number of filters already installed the filter is placed at the end.
        Parameters:
        filter - the filter to be installed; may not be null.
        index - the zero based index; may not be negative.
        See Also:
        ReadFiltered.addReadFilter(Filter, int)
      • removeReadFilter

        public void removeReadFilter​(Filter filter)
        Description copied from interface: ReadFiltered
        Removes the first read filter (lowest index) matching the filter given as a parameter. The filter removed, r, will satisfy the condition r.equals (filter). The remaining filters are shifted to close the gap in the index allocation.
        Parameters:
        filter - the filter to be removed; may not be null.
        See Also:
        ReadFiltered.removeReadFilter(Filter)
      • removeReadFilter

        public void removeReadFilter​(int index)
        Description copied from interface: ReadFiltered
        Removes the read filter installed at the given index. The remaining filters are shifted to close the gap in the index allocation.
        Parameters:
        index - zero-based index of the filter to be removed.
        See Also:
        ReadFiltered.removeReadFilter(int)
      • getReadFilter

        public Filter getReadFilter​(int index)
        Description copied from interface: ReadFiltered
        Returns the read filter installed at the given index.
        Parameters:
        index - zero-based index of the filter to return.
        Returns:
        the filter at that position.
        See Also:
        ReadFiltered.getReadFilter(int)
      • destroyReader

        public void destroyReader()
        Description copied from interface: NetChannelInput

        Destroys the channel end and frees any resources within the JCSP.NET infrastructure.

        See Also:
        org.jcsp.net.NetChannelInputManager#destroyReader()
      • getFactoryClass

        public java.lang.Class getFactoryClass()
        Returns null.
        Returns:
        the Class of the factory class.
      • prepareToMove

        public void prepareToMove()
        Description copied from interface: MigratableChannelInput
        Prepares the channel end for movement to another node.
        See Also:
        org.jcsp.dynamic.MigratableChannelInput#prepareToMove()
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        When serializing object to the output stream, the filters from the underlying channel are extracted so that they too get serialized.
        Parameters:
        out - the stream to write the object to.
        Throws:
        java.io.IOException
      • readObject

        private void readObject​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Reads the serialized object from an input stream. The default read implementation is used.
        Parameters:
        in - object source stream.
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException