|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.util.RequestProcessor
Request processor that is capable to execute actions in special thread.
Inner Class Summary | |
class |
RequestProcessor.Task
The task describing the request task send to the processor. |
Constructor Summary | |
RequestProcessor()
Default constructor. |
|
RequestProcessor(String name)
Constructor. |
Method Summary | |
RequestProcessor.Task |
create(Runnable run)
Creates request that can be later started by setting its delay. |
static RequestProcessor.Task |
createRequest(Runnable run)
Creates request that can be later started by setting its delay. |
protected void |
finalize()
When finalized, stops the thread. |
boolean |
isRequestProcessorThread()
Tests if the current thread is request processor thread. |
RequestProcessor.Task |
post(Runnable run)
This methods asks the request processor to start given runnable immediately. |
RequestProcessor.Task |
post(Runnable run,
int timeToWait)
This methods asks the request processor to start given runnable after timeToWait milliseconds. |
RequestProcessor.Task |
post(Runnable run,
int timeToWait,
int priority)
This methods asks the request processor to start given runnable after timeToWait milliseconds. |
static RequestProcessor.Task |
postRequest(Runnable run)
This methods asks the request processor to start given runnable after timeToWait milliseconds. |
static RequestProcessor.Task |
postRequest(Runnable run,
int timeToWait)
This methods asks the request processor to start given runnable after timeToWait milliseconds. |
static RequestProcessor.Task |
postRequest(Runnable run,
int timeToWait,
int priority)
This methods asks the request processor to start given runnable after timeToWait milliseconds. |
void |
stop()
Stops processing of runnables processor. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RequestProcessor()
public RequestProcessor(String name)
name
- the name to use for the request processor threadMethod Detail |
protected void finalize()
finalize
in class Object
public RequestProcessor.Task post(Runnable run)
Thread.MIN_PRIORITY
.run
- class to runpublic RequestProcessor.Task post(Runnable run, int timeToWait)
timeToWait
milliseconds. The default priority is Thread.MIN_PRIORITY
.run
- class to runtimeToWait
- to wait before executionpublic RequestProcessor.Task post(Runnable run, int timeToWait, int priority)
timeToWait
milliseconds. Given priority is assigned to the
request.run
- class to runtimeToWait
- to wait before executionpriority
- the priority from Thread.MIN_PRIORITY
to Thread.MAX_PRIORITY
public RequestProcessor.Task create(Runnable run)
run
- action to run in the processpublic boolean isRequestProcessorThread()
waitFinished
method. Any two tasks created
by request processor must not wait for themself.true
if the current thread is request processor
thread, otherwise false
public void stop()
public static RequestProcessor.Task postRequest(Runnable run)
timeToWait
milliseconds. The default priority is Thread.MIN_PRIORITY
.run
- class to runpublic static RequestProcessor.Task postRequest(Runnable run, int timeToWait)
timeToWait
milliseconds. The default priority is Thread.MIN_PRIORITY
.run
- class to runtimeToWait
- to wait before executionpublic static RequestProcessor.Task postRequest(Runnable run, int timeToWait, int priority)
timeToWait
milliseconds. Given priority is assigned to the
request.run
- class to runtimeToWait
- to wait before executionpriority
- the priority from Thread.MIN_PRIORITY
to Thread.MAX_PRIORITY
public static RequestProcessor.Task createRequest(Runnable run)
run
- action to run in the process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |