Class games.Battle.client.ClientApplet.ClientTimeoutAgent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class games.Battle.client.ClientApplet.ClientTimeoutAgent

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----games.Battle.client.ClientApplet.ClientTimeoutAgent

public class ClientTimeoutAgent
extends Thread
The client timeout agent is a thread who loops forever until it is killed. During is life span, it marks the time, falls asleep, wakes up and checks how long it has been asleep. If the client wakes up and notices that it has been asleep for longer than its timeout resolution, than it will execute a ClientAbortDialog asking the user if he/she wishes to abort or resume processing the thread which had timed out. The timeout agent is used to monitor the status of socket connections.

Constructor Index

 o ClientTimeoutAgent(long, Applet)
Construct a timeout agent with the given resolution and activation message.

Method Index

 o getApplet()
Return the applet instance this agent is monitoring
 o halt()
Halts execution of the agent
 o reset()
Resets the timer for the timeout agent.
 o run()
Execution method of the timeout agent.

Constructors

 o ClientTimeoutAgent
  public ClientTimeoutAgent(long resolution,
                            Applet a)
Construct a timeout agent with the given resolution and activation message. If the timeout is tripped, then a dialog box is displayed asking if the connection should abandoned or retried.
Parameters:
resolution - the resolution of the agent in milliseconds
the - message to display when the agent times out
the - thread to block if the timeout is tripped

Methods

 o getApplet
  public Applet getApplet()
Return the applet instance this agent is monitoring
 o halt
  public void halt()
Halts execution of the agent
 o run
  public void run()
Execution method of the timeout agent.
Overrides:
run in class Thread
 o reset
  public void reset()
Resets the timer for the timeout agent.

All Packages  Class Hierarchy  This Package  Previous  Next  Index