Package jadex.micro

Class 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.
    • Field Detail

      • 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.