Package jadex.commons.future
Interface ISuspendable
- 
- All Known Implementing Classes:
 ComponentSuspendable,ThreadSuspendable
public interface ISuspendableInterface for suspendable entities. Is used by the IFuture to suspend callers. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<ISuspendable>SUSPENDABLEThe component suspendable for a component thread. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetMonitor()Get the monitor for waiting.voidresume(Future<?> future)Resume the execution of the suspendable.voidsuspend(Future<?> future, long timeout, boolean realtime)Suspend the execution of the suspendable. 
 - 
 
- 
- 
Field Detail
- 
SUSPENDABLE
static final java.lang.ThreadLocal<ISuspendable> SUSPENDABLE
The component suspendable for a component thread. 
 - 
 
- 
Method Detail
- 
suspend
void suspend(Future<?> future, long timeout, boolean realtime)
Suspend the execution of the suspendable.- Parameters:
 future- The future to wait for.timeout- The timeout (-1 for no timeout, -2 for default timeout).realtime- Flag if timeout is realtime (in contrast to simulation time).- Throws:
 TimeoutException- when not resumed before timeout.
 
- 
resume
void resume(Future<?> future)
Resume the execution of the suspendable.- Parameters:
 future- The future that issues the resume.
 
- 
getMonitor
java.lang.Object getMonitor()
Get the monitor for waiting.- Returns:
 - The monitor.
 
 
 - 
 
 -