|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.man.bioinf.apps.invoker.InvokerInternalQueue
InvokerInternalQueue.java This class is used as a helper mechanism for interacting with swing objects. The idea here is that you it you can place an object on this queue, and have a slow method invoked on it in a thread, and then a fast method in the system event queue, without having to worry about the threads themselves. This class originally was originally called SlowInternalQueue but Ive changed it because this was only due to historical reasons anyway. As this class contains an internal thread, with a reference to it, it will not garbage collect by itself. It contains a "destroy()" method which allows graceful shutdown. Once this method has been called on an object any attempt to enqueue to the object will throw an exception.
Created: Mon Dec 07 13:52:32 1998
Compliant:
Field Summary | |
boolean |
systemClosing
|
Fields inherited from interface uk.ac.man.bioinf.apps.systemevents.SystemListener |
NO_VETO, VETO_DUE_TO_ERROR, VETO_DUE_TO_USER_REQUEST |
Constructor Summary | |
InvokerInternalQueue()
|
|
InvokerInternalQueue(SystemEventProducer producer)
|
|
InvokerInternalQueue(SystemEventProducer producer,
List queue)
A new queue. |
Method Summary | |
void |
destroy()
Gracefully close down the thread |
void |
enqueue(AnonInvoker event)
|
boolean |
getOneAtATime()
Get the value of oneAtATime. |
boolean |
isDestroyed()
|
void |
makeEmpty()
|
void |
run()
|
void |
setOneAtATime(boolean oneAtATime)
Set the value of oneAtATime. |
void |
systemEventOccured(SystemEvent e)
This is an event listener for system events. |
int |
systemListenerPriority()
Some events (particularly shut downs) have to happen in a very specific order. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean systemClosing
Constructor Detail |
public InvokerInternalQueue()
public InvokerInternalQueue(SystemEventProducer producer)
public InvokerInternalQueue(SystemEventProducer producer, List queue)
producer
- queue
- Method Detail |
public void run()
run
in interface Runnable
public void makeEmpty()
public boolean isDestroyed()
public void destroy()
public void enqueue(AnonInvoker event)
public boolean getOneAtATime()
public void setOneAtATime(boolean oneAtATime)
oneAtATime
- Value to assign to oneAtATime.public void systemEventOccured(SystemEvent e)
SystemListener
systemEventOccured
in interface SystemListener
e
- the system event occuringpublic int systemListenerPriority()
SystemListener
systemListenerPriority
in interface SystemListener
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |