stella.roof
Class RoofReceiver.CloseThread

java.lang.Object
  extended by java.lang.Thread
      extended by stella.roof.RoofReceiver.CloseThread
All Implemented Interfaces:
Runnable
Enclosing class:
RoofReceiver

protected class RoofReceiver.CloseThread
extends Thread

To open both halfes synchroningly, create an open thread for each half. The roofs have opened when both thread die.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  int roofnr
          The roof number to open.
private  boolean success
          The outcome of the open operation.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected RoofReceiver.CloseThread(int index)
          Constructs a new open thread.
 
Method Summary
protected  boolean isSuccess()
          Returns the success of the opening of the specified roof half.
 void run()
          Running the open thread does nothing else then calling the enclosing class's RoofReceiver.doOpen(int) method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

roofnr

private int roofnr
The roof number to open.


success

private boolean success
The outcome of the open operation.

Constructor Detail

RoofReceiver.CloseThread

protected RoofReceiver.CloseThread(int index)
Constructs a new open thread. It is not started automatically.

Method Detail

run

public void run()
Running the open thread does nothing else then calling the enclosing class's RoofReceiver.doOpen(int) method.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

isSuccess

protected boolean isSuccess()
Returns the success of the opening of the specified roof half.