Jadex 0.96-beta1

jadex.runtime
Class SystemEvent

java.lang.Object
  extended by jadex.runtime.SystemEvent
All Implemented Interfaces:
ISystemEventTypes, Serializable

public class SystemEvent
extends Object
implements ISystemEventTypes, Serializable

A system event indicates that something happend.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface jadex.model.ISystemEventTypes
ISystemEventTypes.Subtypes
 
Field Summary
 
Fields inherited from interface jadex.model.ISystemEventTypes
AGENDA_CHANGED, AGENDA_MODE_CHANGED, AGENDA_STEP_DONE, AGENDA_STEPS_CHANGED, AGENT_BORN, AGENT_DIED, AGENT_EVENT, AGENT_TERMINATING, BELIEF_ADDED, BELIEF_EVENT, BELIEF_REMOVED, BINDING_EVENT, BSFACT_ADDED, BSFACT_CHANGED, BSFACT_EVENT, BSFACT_READ, BSFACT_REMOVED, BSFACTS_CHANGED, CAPABILITY_ADDED, CAPABILITY_EVENT, CAPABILITY_REMOVED, CONDITION_TRIGGERED, ESVALUE_ADDED, ESVALUE_CHANGED, ESVALUE_EVENT, ESVALUE_REMOVED, ESVALUES_CHANGED, EVENT_TYPE_BDI, EVENT_TYPE_STEPPABLE, FACT_CHANGED, FACT_EVENT, FACT_READ, GOAL_ADDED, GOAL_CHANGED, GOAL_EVENT, GOAL_REMOVED, INTERNAL_EVENT, INTERNAL_EVENT_OCCURRED, MESSAGE_EVENT, MESSAGE_RECEIVED, MESSAGE_SENT, PLAN_ADDED, PLAN_CHANGED, PLAN_EVENT, PLAN_REMOVED, TYPE_ANY, VALUE_CHANGED
 
Constructor Summary
SystemEvent()
          Bean constructor.
SystemEvent(String type, Object source)
          Create a new change event.
SystemEvent(String type, Object source, Object value)
          Create a new change event.
SystemEvent(String type, Object source, Object value, int index)
          Create a new change event.
 
Method Summary
 Object clone()
          Create a shallow copy of this system event.
 boolean equals(Object o)
          Test if two system events are equal.
 String getCause()
          Return the cause of this event
 int getIndex()
          Get the index of this event (if any).
 Object getSource()
          Get the event source.
 String getType()
          Get the type.
 Object getValue()
          Get the value of this event (if any).
 int hashCode()
          Get the elements hashcode.
 boolean instanceOf(String type)
          Check if this event type is a (sub) type of the given event type.
 boolean isChangeRelevant()
          Does this event denote a system change, potentially relevant for conditions?
 boolean isDerived()
          Test if the system event is derived.
 boolean isInit()
          Test if init event.
 void setCause(String cause)
          The cause of this event
 void setDerived(boolean derived)
          Set the derived state.
 void setIndex(int index)
          Get the index of this event (if any).
 void setInit(boolean init)
          Set init event state.
 void setSource(Object source)
          Set the event source.
 void setType(String type)
          Set the type.
 void setValue(Object value)
          Set the value of this event (if any).
 String toString()
          Get the string representation.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemEvent

public SystemEvent()
Bean constructor.


SystemEvent

public SystemEvent(String type,
                   Object source)
Create a new change event.

Parameters:
type - The system event type.
source - The event source.

SystemEvent

public SystemEvent(String type,
                   Object source,
                   Object value)
Create a new change event.

Parameters:
type - The system event type.
source - The event source.
value - The value of the element.

SystemEvent

public SystemEvent(String type,
                   Object source,
                   Object value,
                   int index)
Create a new change event.

Parameters:
type - The system event type.
source - The event source.
value - The value at the specified index.
index - The index where the change occurred.
Method Detail

getType

public String getType()
Get the type.

Returns:
The type.

setType

public void setType(String type)
Set the type.


isChangeRelevant

public boolean isChangeRelevant()
Does this event denote a system change, potentially relevant for conditions?

Returns:
True, if this event denotes a relevant system change.

getSource

public Object getSource()
Get the event source.


setSource

public void setSource(Object source)
Set the event source.


getValue

public Object getValue()
Get the value of this event (if any).


setValue

public void setValue(Object value)
Set the value of this event (if any).


getIndex

public int getIndex()
Get the index of this event (if any).


setIndex

public void setIndex(int index)
Get the index of this event (if any).


setCause

public void setCause(String cause)
The cause of this event

Parameters:
cause - The cause.

getCause

public String getCause()
Return the cause of this event


isDerived

public boolean isDerived()
Test if the system event is derived.

Returns:
True, if derived.

setDerived

public void setDerived(boolean derived)
Set the derived state.

Parameters:
derived - The derived state.

isInit

public boolean isInit()
Test if init event.

Returns:
True, if init event.

setInit

public void setInit(boolean init)
Set init event state.

Parameters:
init - The init event state.

instanceOf

public boolean instanceOf(String type)
Check if this event type is a (sub) type of the given event type.

Parameters:
type - The system event type that may be a subtype.

equals

public boolean equals(Object o)
Test if two system events are equal.

Overrides:
equals in class Object
Returns:
True, if equal.

hashCode

public int hashCode()
Get the elements hashcode.

Overrides:
hashCode in class Object
Returns:
The hashcode for identification.

toString

public String toString()
Get the string representation.

Overrides:
toString in class Object
Returns:
The string representation.

clone

public Object clone()
Create a shallow copy of this system event.

Overrides:
clone in class Object

Jadex 0.96-beta1

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.