Package xal.smf.scada

Class ScadaCheckConnect.TestChannelList

java.lang.Object
xal.smf.scada.ScadaCheckConnect.TestChannelList
Enclosing class:
ScadaCheckConnect

public static final class ScadaCheckConnect.TestChannelList extends Object
List of channels under test. Access to the internal list is synchronized for batch operation of channel access connection monitor objects.
Since:
Mar 7, 2011
Author:
Christopher K. Allen
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new, empty TestChannelList object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Channel chn)
    Add the given channel to the list.
    Returns the list of channels which never connected, that is, they are still pending.
    void
    Removes the given channel from the the channel list.
    int
    Returns the number of the channels that passed the connection test.
    int
    Returns the size of the list, i.e., the number of unconnected channels in the list.
    boolean
    testChannelConnects(double dblTmOut)
    Sends a "connection request" to Channel Access for all the channels within the list.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestChannelList

      public TestChannelList()
      Create a new, empty TestChannelList object.
      Since:
      Mar 7, 2011
  • Method Details

    • sizePending

      public int sizePending()
      Returns the size of the list, i.e., the number of unconnected channels in the list.
      Returns:
      number of unconnected channels in list
      Since:
      Mar 7, 2011
    • sizeConnected

      public int sizeConnected()
      Returns the number of the channels that passed the connection test.
      Returns:
      number of connected channels
    • getPending

      public List<Channel> getPending()
      Returns the list of channels which never connected, that is, they are still pending.
      Returns:
      all the channels that failed to connect
      Since:
      Mar 10, 2011
    • add

      public void add(Channel chn)
      Add the given channel to the list.
      Parameters:
      chn - new list channel
      Since:
      Mar 7, 2011
    • remove

      public void remove(Channel chn)
      Removes the given channel from the the channel list. If there are not more channels in the list we send an interrupt to the main thread.
      Parameters:
      chn - channel to be removed
      Since:
      Mar 7, 2011
    • testChannelConnects

      public boolean testChannelConnects(double dblTmOut)
      Sends a "connection request" to Channel Access for all the channels within the list. If all connection monitors return before the timeout period the method remove(Channel) will issue an interrupt waking up the current thread.
      Parameters:
      dblTmOut - time (in seconds) to wait before connection attempt is aborted
      Returns:
      true if all connections were made in the alloted time, false if otherwise
      Since:
      Mar 7, 2011