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 SummaryFields Modifier and Type Field Description static java.lang.ThreadLocal<ISuspendable>SUSPENDABLEThe component suspendable for a component thread.
 - 
Method SummaryAll 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- 
SUSPENDABLEstatic final java.lang.ThreadLocal<ISuspendable> SUSPENDABLE The component suspendable for a component thread.
 
- 
 - 
Method Detail- 
suspendvoid 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.
 
 - 
resumevoid resume(Future<?> future) Resume the execution of the suspendable.- Parameters:
- future- The future that issues the resume.
 
 - 
getMonitorjava.lang.Object getMonitor() Get the monitor for waiting.- Returns:
- The monitor.
 
 
- 
 
-