|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.caff.gimmix.Worker
public abstract class Worker
A Runnable which knows of exceptions.
![]() |
![]() |
Constructor Summary | |
---|---|
Worker()
Default constructor. |
|
Worker(KnockOffListener listener)
Constructor taking an intial knock off listener. |
Method Summary | |
---|---|
void |
addKnockOffListener(KnockOffListener listener)
Add a knock off listener. |
protected abstract void |
execute()
Implement this in extending classes to do the work. |
java.lang.Throwable |
getCatched()
Get the thrwoable catched during work, if there happened one. |
protected void |
informKnockOffListeners()
Call all knockoff listeners. |
static void |
invokeInEventDispatchThread(java.lang.Runnable run)
Invoke in the AWT thread. |
void |
removeKnockOffListener(KnockOffListener listener)
Remove a knock off listener. |
void |
rethrow()
This throws the catched exception if there occured one. |
void |
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Worker()
public Worker(KnockOffListener listener)
listener
- knock off listenerMethod Detail |
---|
public void run()
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface java.lang.Runnable
Thread.run()
protected abstract void execute() throws java.lang.Exception
java.lang.Exception
- any exception thrown during workpublic java.lang.Throwable getCatched()
null
if there didn't occure anypublic void rethrow() throws java.lang.Throwable
java.lang.Throwable
- exception catched during execute of workpublic void addKnockOffListener(KnockOffListener listener)
listener
- new listenerpublic void removeKnockOffListener(KnockOffListener listener)
listener
- listener to removeprotected void informKnockOffListeners()
public static void invokeInEventDispatchThread(java.lang.Runnable run)
run
- runnable which has to be invoked in the AWT event thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |