public class ComponentSuspendable extends ThreadLocalTransferHelper implements ISuspendable
| Modifier and Type | Field and Description | 
|---|---|
| protected IInternalAccess | agentThe component adapter. | 
| static java.lang.ThreadLocal<ComponentSuspendable> | COMSUPSThe component suspendables. | 
| protected Future<?> | futureThe current future. | 
| protected java.util.Map<java.lang.ThreadLocal<java.lang.Object>,java.lang.Object> | valsThe thread locals. | 
THREADLOCALSSUSPENDABLE| Constructor and Description | 
|---|
| ComponentSuspendable(IInternalAccess agent)Create a component suspendable. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | getDefaultTimeout()Get the default timeout. | 
| Future<?> | getFuture()Get the future. | 
| java.lang.Object | getMonitor()Get the monitor for waiting. | 
| void | resume(Future<?> future)Resume the execution of the suspendable. | 
| void | suspend(Future<?> future,
       long timeout,
       boolean realtime)Suspend the execution of the suspendable. | 
| java.lang.String | toString()Get the string representation. | 
addThreadLocal, afterSwitch, beforeSwitch, removeThreadLocal, restoreValues, saveValuespublic static final java.lang.ThreadLocal<ComponentSuspendable> COMSUPS
protected IInternalAccess agent
protected Future<?> future
protected java.util.Map<java.lang.ThreadLocal<java.lang.Object>,java.lang.Object> vals
public ComponentSuspendable(IInternalAccess agent)
public void suspend(Future<?> future, long timeout, boolean realtime)
suspend in interface ISuspendablefuture - The future to wait for.timeout - The timeout.realtime - Flag if timeout is realtime (in contrast to simulation time).public void resume(Future<?> future)
resume in interface ISuspendablefuture - The future that issues the resume.public java.lang.Object getMonitor()
getMonitor in interface ISuspendablepublic Future<?> getFuture()
public long getDefaultTimeout()
public java.lang.String toString()
toString in class java.lang.Object