Overview  Package   Class  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

sajas.core.behaviours
Class Behaviour.RunnableChangedEvent
java.lang.Object
  sajas.core.behaviours.Behaviour.RunnableChangedEvent
All Implemented Interfaces:
jade.util.leap.Serializable, Serializable
Enclosing class:
Behaviour

protected class Behaviour.RunnableChangedEvent
extends Object
implements jade.util.leap.Serializable
Event class for notifying blocked and restarted behaviours. This class is used to notify interested behaviours when a Behaviour changes its runnable state. It may be sent to behaviour's parent (upward notification or to behaviour's children (downward notification).

Constructor Summary
protected
RunnableChangedEvent()
Method Summary
getSource()
          Read event source.
void
init(boolean b, int d)
          Re-init event content.
boolean
isRunnable()
          Check whether the event is runnable.
boolean
isUpwards()
          Check which direction this event is travelling.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunnableChangedEvent
protected RunnableChangedEvent()
Method Detail
init
public void init(boolean b,
                 int d)
Re-init event content. This method can be used to rewrite an existing event with new data (much cheaper than making a new object).
Parameters:
b - A boolean flag; when false it means that a behaviour passed from Ready to Blocked state. When true it means that a behaviour passed from Blocked to Ready (this flag is the truth value of the predicate 'The behaviour has now become runnable'.
d - A notification direction: when direction is NOTIFY_UP, the event travels upwards the behaviour containment hierarchy; when it is NOTIFY_DOWN, the event travels downwards.

getSource
public Behaviour getSource()
Read event source.
Returns:
The Behaviour object which generated this event.

isRunnable
public boolean isRunnable()
Check whether the event is runnable.
Returns:
true when the behaviour generating this event has become Ready, false when it has become Blocked.

isUpwards
public boolean isUpwards()
Check which direction this event is travelling.
Returns:
true when the event is a notification going from a child behaviour to its parent; false otherwise.

Overview  Package   Class  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Java API documentation generated with DocFlex/Doclet 1.6.1 using JavadocPro template set.
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc, which is a template-driven programming tool for rapid development of any Javadoc-based Java API documentation generators (i.e. doclets). If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com