jade.core.behaviours
Class OneShotBehaviour

java.lang.Object
  |
  +--jade.core.behaviours.Behaviour
        |
        +--jade.core.behaviours.SimpleBehaviour
              |
              +--jade.core.behaviours.OneShotBehaviour
Direct Known Subclasses:
SenderBehaviour

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: 2000/09/12 13:24:02 $ $Revision: 2.0 $
Author:
Giovanni Rimassa - Universita` di Parma
See Also:
Serialized Form

Inner classes inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
OneShotBehaviour()
          Default constructor.
OneShotBehaviour(Agent a)
          This constructor sets the owner agent for this OneShotBehaviour.
 
Method Summary
 boolean done()
          This is the method that makes OneShotBehaviour one-shot, because it always returns true.
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
Methods inherited from class jade.core.behaviours.Behaviour
action, actionWrapper, block, block, getBehaviourName, getDataStore, handle, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.
Overrides:
done in class Behaviour
Returns:
Always true.