CICS® Transaction Gateway Programming Reference V3.1

com.ibm.ctg.epi
Class EPITerminal.Timer

java.lang.Object
  |
  +--com.ibm.ctg.epi.EPITerminal.Timer

class EPITerminal.Timer
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable

This class is a simple timer. It has a thread which does nothing but go to sleep for the timeout interval. If when it wakes up it finds that the reset flag is not set, it ends and calls the EPITerminal.timedOut method.

See Also:
Serialized Form

Field Summary
(package private)  boolean killed
          flag used to stop the thread
(package private)  boolean reset
          reset flag
(package private)  boolean running
          thread running flag
(package private)  long timeout
          timeout interval
 
Constructor Summary
(package private) EPITerminal.Timer()
           
 
Method Summary
(package private)  long getTimeout()
          Returns the timeout period.
(package private)  void reset()
          Reset the timer.
(package private)  void setTimeout(long t)
          Set the timeout period.
(package private)  void start()
          Start the timer.
(package private)  void stop()
          Stop the timer.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeout

long timeout
timeout interval

reset

transient boolean reset
reset flag

killed

transient boolean killed
flag used to stop the thread

running

transient boolean running
thread running flag
Constructor Detail

EPITerminal.Timer

EPITerminal.Timer()
Method Detail

setTimeout

void setTimeout(long t)
Set the timeout period. A timeout <= 0 means no timeout.
Parameters:
t - the timeout period

getTimeout

long getTimeout()
Returns the timeout period. A timeout <= 0 means no timeout.
Returns:
the timeout period

reset

void reset()
Reset the timer. The timer keeps running.

stop

void stop()
Stop the timer.

start

void start()
Start the timer.

© Copyright IBM Corp. 1994, 1999