jade.core.behaviours
Class OneShotBehaviour

java.lang.Object
  |
  +--jade.core.behaviours.Behaviour
        |
        +--jade.core.behaviours.SimpleBehaviour
              |
              +--jade.core.behaviours.OneShotBehaviour
All Implemented Interfaces:
Serializable, java.io.Serializable
Direct Known Subclasses:
ReplySender, 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: 2000-09-12 15:24:08 +0200 (mar, 12 set 2000) $ $Revision: 1857 $
Author:
Giovanni Rimassa - Universita` di Parma
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jade.core.behaviours.Behaviour
myAgent
 
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, block, block, getBehaviourName, getDataStore, getParent, 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.

Specified by:
done in class Behaviour
Returns:
Always true.


JADE