org.ifeth.sehr.client.api
Class ThreadSEHR

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.ifeth.sehr.client.api.ThreadSEHR
All Implemented Interfaces:
java.lang.Runnable

public class ThreadSEHR
extends java.lang.Thread

'Watch Dog' and background thread to do some stuff like collecting updates on 'expensive' connections, clean-up unused objects etc.

This thread is running continuously in the background. The purpose is to monitor the connection thread ThreadDataTransferand to transfer data periodically if user defines an intervall >0 at DlgConfig#doClose(boolean)

Author:
hansjhaase

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadSEHR(SessionHandler sess)
          Constructor with a given session object which states our application.
 
Method Summary
 void clear()
          Stop the SEHR thread...
 void run()
          Run the 'never ending' thread :) The thread reflect two use cases
update data if user sets an refreshing intervall check if a connection is still required on 'expensive' lines
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadSEHR

public ThreadSEHR(SessionHandler sess)
Constructor with a given session object which states our application.

Method Detail

run

public void run()
Run the 'never ending' thread :)

The thread reflect two use cases

  • update data if user sets an refreshing intervall
  • check if a connection is still required on 'expensive' lines

  • clear

    public void clear()
    Stop the SEHR thread...