|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.curjent.agent.SingletonTask
public class SingletonTask
Source for one task.
This implementation is not thread-safe.
| Constructor Summary | |
|---|---|
SingletonTask(Object task)
Singleton source for the given task. |
|
| Method Summary | |
|---|---|
Object |
acquire()
Returns the task used to construct this singleton. |
void |
release(Object task)
Releases the given task, making it available to be acquired
again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingletonTask(Object task)
task.
NullPointerException - Argument is null.| Method Detail |
|---|
public Object acquire()
throws Throwable
null if the task is currently acquired.
acquire in interface AgentTasksThrowable - An unexpected error.Agent.newInstance(AgentLoader, Class[], AgentTasks, Class)
public void release(Object task)
throws Throwable
task, making it available to be acquired
again.
release in interface AgentTasksNullPointerException - Argument is null.
IllegalStateException - Task was already released.
Throwable - An unexpected error.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||