Package jadex.micro
Class IntervalBehavior<T>
- java.lang.Object
-
- jadex.micro.IntervalBehavior<T>
-
public class IntervalBehavior<T> extends java.lang.Object
Automatically 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 class
IntervalBehavior.StepResultListener<E,F>
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
component
The component.protected long
delay
The delay.protected java.lang.String
id
The current id.protected boolean
realtime
The realtime flag.protected IComponentStep<T>
step
The 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 long
getDelay()
Get the delay.java.lang.String
getId()
Get the id.IComponentStep<T>
getStep()
Get the step.void
setDelay(long delay)
Set the delay.void
setId(java.lang.String sendid)
Set the id.void
setStep(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.
-
-