dk.itu.smds.torusman
Class BTListener

java.lang.Object
  extended by java.lang.Thread
      extended by dk.itu.smds.torusman.BTListener
All Implemented Interfaces:
java.lang.Runnable

public class BTListener
extends java.lang.Thread

The listener interface for receiving BT events. The class that is interested in processing a BT event implements this interface, and the object created with that class is registered with a component using the component's addBTListener method. When the BT event occurs, that object's appropriate method is invoked.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 int latestAdd
          The latest add.
 DistTorus lt
          The lt.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BTListener(DistTorus myTorus)
          Instantiates a new bT listener.
 
Method Summary
 void run()
          Listen for packages on an incoming call from another player and starts accepting packages while handling them.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

latestAdd

public volatile int latestAdd
The latest add.


lt

public DistTorus lt
The lt.

Constructor Detail

BTListener

public BTListener(DistTorus myTorus)
Instantiates a new bT listener.

Parameters:
myTorus - the torus
Method Detail

run

public void run()
Listen for packages on an incoming call from another player and starts accepting packages while handling them.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()