org.deegree_impl.services
Class AbstractHandler.Loop

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.deegree_impl.services.AbstractHandler.Loop
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
Dispatcher_Impl.RequestLoop, Dispatcher_Impl.ResponseLoop
Enclosing class:
AbstractHandler

public abstract class AbstractHandler.Loop
extends java.lang.Thread

The loop have to be started by the classes that extends AbstractHandler. This may be realized by overriding the methods handleRequest and handleResponse.


Field Summary
protected  boolean stop
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AbstractHandler.Loop()
           
 
Method Summary
protected  void onStopped()
          this method will be called after a loop has been stopped.
protected abstract  void process()
          this method is called within the loop.
 void run()
          overrides the run-methode declared within the Runnable-interface
 void stopLoop()
          stops the loop resp. the Thread
 
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

stop

protected boolean stop
Constructor Detail

AbstractHandler.Loop

public AbstractHandler.Loop()
Method Detail

run

public final void run()
overrides the run-methode declared within the Runnable-interface


onStopped

protected void onStopped()
this method will be called after a loop has been stopped. As default no action is performed; but the method can be overwritten by an extending class to perform some clean-up actions for example.


process

protected abstract void process()
this method is called within the loop. An extending class have to implement this method.


stopLoop

public void stopLoop()
stops the loop resp. the Thread