Class OneShotBehaviour

  • All Implemented Interfaces:
    Serializable, Serializable
    Direct Known Subclasses:
    ReplySender, SenderBehaviour, StateResetter

    public abstract class OneShotBehaviour
    extends SimpleBehaviour
    Atomic behaviour that executes just once. This abstract class can be extended by application programmers to create behaviours for operations that need to be done just one time.
    Version:
    $Date$ $Revision$
    Author:
    Giovanni Rimassa - Universita` di Parma
    See Also:
    Serialized Form
    • Constructor Detail

      • OneShotBehaviour

        public OneShotBehaviour()
        Default constructor. It does not set the owner agent.
      • OneShotBehaviour

        public OneShotBehaviour​(Agent a)
        This constructor sets the owner agent for this OneShotBehaviour.
        Parameters:
        a - The agent this behaviour belongs to.
    • Method Detail

      • done

        public final boolean done()
        This is the method that makes OneShotBehaviour one-shot, because it always returns true.
        Specified by:
        done in class Behaviour
        Returns:
        Always true.