QJCC homepage

biz.chitec.quarterback.gjsa
Class SessionedServerConnector.BackgroundConnectionOpener

java.lang.Object
  extended byjava.lang.Thread
      extended bybiz.chitec.quarterback.util.StoppableThread
          extended bybiz.chitec.quarterback.gjsa.SessionedServerConnector.BackgroundConnectionOpener
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
SessionedServerConnector

private class SessionedServerConnector.BackgroundConnectionOpener
extends StoppableThread

Seperate thread for connection opening in the background. If started, it fires a BACKGROUNDCONNECT property change. Then, it attempts to open the connection to the server. If that succeeds, the usual CONNECTED property change is sent and the thread ends silently. If the connection attempt fails, however, a BGEXCEPTION property change is sent containing the exception object as new value. After that, the thread wait()s for 3 seconds and tries again to connect. This loop is repeated as long as either a connection attempt succeeds or the thread is asked to stop. In case of an unsuccessful finishing, a final BACKGROUNDCONNECT property change is sent with new value set to false.


Nested Class Summary
 
Nested classes inherited from class biz.chitec.quarterback.util.StoppableThread
StoppableThread.StopException
 
Field Summary
private  long initialwaittime
           
 
Fields inherited from class biz.chitec.quarterback.util.StoppableThread
shouldbestopped
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SessionedServerConnector.BackgroundConnectionOpener(long initialwaittimex)
           
 
Method Summary
 void run()
           
 
Methods inherited from class biz.chitec.quarterback.util.StoppableThread
shouldBeStopped, stopGracefully
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

initialwaittime

private long initialwaittime
Constructor Detail

SessionedServerConnector.BackgroundConnectionOpener

public SessionedServerConnector.BackgroundConnectionOpener(long initialwaittimex)
Method Detail

run

public void run()

QJCC homepage