org.primordion.xholon.base
Class ObservableStateMachineEntity

java.lang.Object
  extended byorg.primordion.xholon.base.Xholon
      extended byorg.primordion.xholon.base.StateMachineEntity
          extended byorg.primordion.xholon.base.ObservableStateMachineEntity
All Implemented Interfaces:
CeBehavior, CeStateMachineEntity, IObservable, IStateMachineEntity, IXholon

public class ObservableStateMachineEntity
extends StateMachineEntity
implements IObservable

Observable StateMachineEntity.

Since:
0.5 (Created on March 12, 2007)
Author:
Ken Webb
See Also:
on Java.util.Observable class; inspired by Gamma et al. (1995). Design Patterns. (Observer pattern)

Field Summary
 
Fields inherited from class org.primordion.xholon.base.StateMachineEntity
ACTIVITYID_NONE, CNPT_OUTGOING1, CNPT_OUTGOING10, CNPT_OUTGOING2, CNPT_OUTGOING3, CNPT_OUTGOING4, CNPT_OUTGOING5, CNPT_OUTGOING6, CNPT_OUTGOING7, CNPT_OUTGOING8, CNPT_OUTGOING9, CNPT_TARGET, guardActivityId, MAX_ACTIVE_SUBSTATES, MAX_TRIGGERS, PRINT_ACTIVE_SUBSTATE, roleName, uid
 
Fields inherited from class org.primordion.xholon.base.Xholon
DEFAULT_LEVEL, interaction, interactionsEnabled
 
Fields inherited from interface org.primordion.xholon.base.IXholon
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx
 
Fields inherited from interface org.primordion.xholon.common.mechanism.CeBehavior
BehaviorCE, OpaqueBehaviorCE
 
Fields inherited from interface org.primordion.xholon.common.mechanism.CeStateMachineEntity
ActivityCE, ConnectionPointReferenceCE, DeferrableTriggerCE, DoActivityCE, EntryActivityCE, ExitActivityCE, FinalStateCE, GuardCE, PseudostateCE, PseudostateChoiceCE, PseudostateDeepHistoryCE, PseudostateEntryPointCE, PseudostateExitPointCE, PseudostateForkCE, PseudostateInitialCE, PseudostateJoinCE, PseudostateJunctionCE, PseudostateShallowHistoryCE, PseudostateTerminateCE, RegionCE, StateCE, StateMachineCE, StateMachineEntityCE, TargetCE, TransitionCE, TransitionExternalCE, TransitionInternalCE, TransitionLocalCE, TriggerCE, VertexCE
 
Constructor Summary
ObservableStateMachineEntity()
           
 
Method Summary
 void addObserver(IXholon o)
          Adds an observer to the set of observers for this object.
 int countObservers()
          Returns the number of observers of this Observable object.
 void deleteObserver(IXholon o)
          Deletes an observer from the set of observers of this object.
 void deleteObservers()
          Clears the observer list so that this object no longer has any observers.
 java.lang.Object getChangedData()
          Get changed data.
 boolean hasChanged()
          Tests if this object has changed.
 void notifyObservers()
          If this object has changed, then notify all of its observers.
 void notifyObservers(java.lang.Object arg)
          If this object has changed, then notify all of its observers.
 
Methods inherited from class org.primordion.xholon.base.StateMachineEntity
act, configure, doStateMachine, getActivityId, getDoActivityId, getEntryActivityId, getExitActivityId, getGuardActivityId, getMaxPorts, getOwningXholon, getPort, getRoleName, getTrigger, getUid, getVal, initialize, initializeStateMachines, isActiveSubState, notifyActiveSubStates, postConfigure, setMaxPorts, setPorts, setRoleName, setUid, terminate, toString
 
Methods inherited from class org.primordion.xholon.base.Xholon
appendChild, appendChild, appendChild, cleanup, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextId, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPreviousSibling, getRootNode, getSiblings, getSizeMessageQ, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, resetNextId, sendMessage, sendMessage, sendMessage, setAttributeVal, setFactory, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setSizeMessageQ, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, treeSize, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.primordion.xholon.base.IXholon
act, appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, sendMessage, sendMessage, sendMessage, setAttributeVal, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, treeSize, writeXml
 

Constructor Detail

ObservableStateMachineEntity

public ObservableStateMachineEntity()
Method Detail

addObserver

public void addObserver(IXholon o)
Description copied from interface: IObservable
Adds an observer to the set of observers for this object.

Specified by:
addObserver in interface IObservable
Parameters:
o - An observer.

countObservers

public int countObservers()
Description copied from interface: IObservable
Returns the number of observers of this Observable object.

Specified by:
countObservers in interface IObservable
Returns:
The current number of observers.

deleteObserver

public void deleteObserver(IXholon o)
Description copied from interface: IObservable
Deletes an observer from the set of observers of this object.

Specified by:
deleteObserver in interface IObservable
Parameters:
o - An observer.

deleteObservers

public void deleteObservers()
Description copied from interface: IObservable
Clears the observer list so that this object no longer has any observers.

Specified by:
deleteObservers in interface IObservable

notifyObservers

public void notifyObservers()
Description copied from interface: IObservable
If this object has changed, then notify all of its observers.

Specified by:
notifyObservers in interface IObservable

notifyObservers

public void notifyObservers(java.lang.Object arg)
Description copied from interface: IObservable
If this object has changed, then notify all of its observers.

Specified by:
notifyObservers in interface IObservable
Parameters:
arg - Some data.

hasChanged

public boolean hasChanged()
Description copied from interface: IObservable
Tests if this object has changed.

Specified by:
hasChanged in interface IObservable
Returns:
true if and only if the setChanged method has been called more recently than the clearChanged method on this object; false otherwise.

getChangedData

public java.lang.Object getChangedData()
Description copied from interface: IObservable
Get changed data.

Specified by:
getChangedData in interface IObservable
Returns:
Some Object, or null.