Package xal.smf.scada
Class ScadaCheckConnect.TestChannelList
java.lang.Object
xal.smf.scada.ScadaCheckConnect.TestChannelList
- Enclosing class:
- ScadaCheckConnect
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
TestChannelList
public TestChannelList()Create a new, emptyTestChannelList
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
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
Add the given channel to the list.- Parameters:
chn
- new list channel- Since:
- Mar 7, 2011
-
remove
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 methodremove(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
-