|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread plugins.AbstractPlugin
An abstract plugin. Every plugin has its own thread to enable parallel estimation of the PDFs. The thread blocks until it is triggered by the locator. A PDF is then calculated and returned by using the callback.
Field Summary | |
protected java.util.Vector |
services
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
protected |
AbstractPlugin()
|
Method Summary | |
protected abstract PDF |
createPdf(long timeout)
calculate the current PDF. |
protected abstract void |
freeRessources()
prepare to get deleted, so free all aquired ressource |
abstract java.util.Vector |
getRequiredServices()
get a list of service objects of the appropriate type |
java.util.Vector |
getServices()
check which services are currently assigned to the plugin |
void |
load()
load the plugin, start the thread. |
protected abstract boolean |
needMoreServices()
check if all required services where assigned to the plugin. |
void |
run()
private |
void |
setServices(java.util.Vector services)
assign a list of services to the plugin. |
void |
trigger(PDFDrain drain,
long timeout,
int handle)
trigger the caclulation of the current PDF. |
void |
unload()
unload the plugin, stop 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 |
protected java.util.Vector services
Constructor Detail |
protected AbstractPlugin()
Method Detail |
public void trigger(PDFDrain drain, long timeout, int handle)
trigger
in interface Plugin
drain
- the callback objecttimeout
- the maximum absolut system time until the PDF must be returnedhandle
- a handle which is to be passed at callbackpublic void load()
load
in interface Plugin
public void unload()
unload
in interface Plugin
public void setServices(java.util.Vector services)
setServices
in interface ServiceUser
public java.util.Vector getServices()
getServices
in interface ServiceUser
public abstract java.util.Vector getRequiredServices()
getRequiredServices
in interface ServiceUser
protected abstract boolean needMoreServices()
protected abstract PDF createPdf(long timeout)
protected abstract void freeRessources()
public void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |