gov.sns.ca
Class ChannelSystem

java.lang.Object
  |
  +--gov.sns.ca.ChannelSystem
Direct Known Subclasses:
JcaSystem

public abstract class ChannelSystem
extends java.lang.Object

ChannelSystem is a wrapper for static methods of Channel subclasses that are public and should be generally visible. This is necessary since there is no abstract static method construct in Java. A subclass of ChannelSystem will handle the request as appropriate by calling static methods of the target Channel subclass.


Field Summary
protected  boolean willSyncRequest
           
 
Constructor Summary
protected ChannelSystem()
          Creates a new instance of ChannelSystem
 
Method Summary
abstract  void pendEvent(double timeout)
          Schedule the queued requests with the specified timeout
abstract  boolean pendIO(double timeout)
          Schedule an IO request with the specified timeout
abstract  void setDebugMode(boolean debugFlag)
          Set the debug mode of the channel system.
 void setSyncRequest(boolean newStatus)
          Set whether the requests are handled synchronously or asynchronously
 boolean willSyncRequest()
          Determine whether requests will be handled synchronously
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

willSyncRequest

protected volatile boolean willSyncRequest
Constructor Detail

ChannelSystem

protected ChannelSystem()
Creates a new instance of ChannelSystem

Method Detail

setDebugMode

public abstract void setDebugMode(boolean debugFlag)
Set the debug mode of the channel system.

Parameters:
debugFlag - True to enable debug mode and false to disable debug mode.

setSyncRequest

public void setSyncRequest(boolean newStatus)
Set whether the requests are handled synchronously or asynchronously

Parameters:
newStatus - true for synchronous mode and false for asynchronous mode

willSyncRequest

public boolean willSyncRequest()
Determine whether requests will be handled synchronously

Returns:
true if requests are handled synchronously

pendIO

public abstract boolean pendIO(double timeout)
Schedule an IO request with the specified timeout

Parameters:
timeout - the maximum time to wait for a successful pend IO

pendEvent

public abstract void pendEvent(double timeout)
Schedule the queued requests with the specified timeout

Parameters:
timeout - the maximum time to wait for successful handling of the request