Package jadex.micro
Class IntervalBehavior<T>
- java.lang.Object
-
- jadex.micro.IntervalBehavior<T>
-
public class IntervalBehavior<T> extends java.lang.ObjectAutomatically reinvokes send method in intervals determined by the delay (in state). Subclasses should override send to perform specific actions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIntervalBehavior.StepResultListener<E,F>
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccesscomponentThe component.protected longdelayThe delay.protected java.lang.StringidThe current id.protected booleanrealtimeThe realtime flag.protected IComponentStep<T>stepThe component step.
-
Constructor Summary
Constructors Constructor Description IntervalBehavior(IInternalAccess component, long delay, IComponentStep<T> step, boolean realtime)Create a new lease time handling object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDelay()Get the delay.java.lang.StringgetId()Get the id.IComponentStep<T>getStep()Get the step.voidsetDelay(long delay)Set the delay.voidsetId(java.lang.String sendid)Set the id.voidsetStep(IComponentStep<T> step)Set the step.IFuture<java.lang.Void>startBehavior()Start sending awareness infos.IFuture<java.lang.Void>stopBehavior()(Ends automatically when a new send behaviour is started).
-
-
-
Field Detail
-
component
protected IInternalAccess component
The component.
-
step
protected IComponentStep<T> step
The component step.
-
delay
protected long delay
The delay.
-
id
protected java.lang.String id
The current id.
-
realtime
protected boolean realtime
The realtime flag.
-
-
Constructor Detail
-
IntervalBehavior
public IntervalBehavior(IInternalAccess component, long delay, IComponentStep<T> step, boolean realtime)
Create a new lease time handling object.
-
-
Method Detail
-
startBehavior
public IFuture<java.lang.Void> startBehavior()
Start sending awareness infos. (Ends automatically when a new send behaviour is started).
-
stopBehavior
public IFuture<java.lang.Void> stopBehavior()
(Ends automatically when a new send behaviour is started).
-
getId
public java.lang.String getId()
Get the id.- Returns:
- the id.
-
setId
public void setId(java.lang.String sendid)
Set the id.- Parameters:
id- The id to set.
-
getStep
public IComponentStep<T> getStep()
Get the step.- Returns:
- The step.
-
setStep
public void setStep(IComponentStep<T> step)
Set the step.- Parameters:
step- The step to set.
-
getDelay
public long getDelay()
Get the delay.- Returns:
- The delay.
-
setDelay
public void setDelay(long delay)
Set the delay.- Parameters:
delay- The delay to set.
-
-