|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.primordion.xholon.base.Xholon
org.primordion.xholon.base.TreeNodeFactoryStatic
TreeNodeFactoryStatic manages concrete instances of TreeNode subclasses. A finite number of reusable entities are allocated when the app starts up. Call the various get methods to get instances of Xholon, XholonClass, StateMachineEntity, and Activity. Call the return method to return any of these to the factory for reuse. This is a Singleton class. Internally, the TreeNode instances are maintained in arrays, one for each subclass. This could be changed later if necessary, while having no effect on the rest of the system.
| Field Summary | |
static int |
RESOURCE_ACTIVITY
|
static int |
RESOURCE_STATEMACHINEENTITY
|
static int |
RESOURCE_XHOLON
|
static int |
RESOURCE_XHOLONCLASS
|
| 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 |
| Constructor Summary | |
TreeNodeFactoryStatic(java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass)
Default constructor. |
|
TreeNodeFactoryStatic(int maxXholons,
int maxXholonClasses,
int maxActivities,
int maxStateMachineEntities,
java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass)
Preferred constructor. |
|
TreeNodeFactoryStatic(int maxXholons,
int maxXholonClasses,
int maxActivities,
int maxStateMachineEntities,
java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass,
java.lang.Class activitySubclass)
Constructor for apps that need to use a subclass of Activity. |
|
| Method Summary | |
Activity |
getActivityNode()
Get a Activity node from the factory. |
AbstractGrid |
getGridEntityNode()
Get a GridEntity node from the factory. |
IXholon |
getNode(java.lang.Class xholonSubclass)
Get a node instance of the specified Java class. |
IXholon |
getNode(int xhType)
Get a node instance of the specified Xholon Type. |
int |
getNumAvailNodes(int resourceType)
Get number of treeNodes available for use. |
StateMachineEntity |
getStateMachineEntityNode()
Get a StateMaqchineEntity node from the factory. |
IXholonClass |
getXholonClassNode()
Get a XholonClass instance from the factory. |
IXholon |
getXholonNode()
Get a Xholon instance from the factory. |
IXholon |
getXholonNode(java.lang.String implName)
Get a Xholon instance from the factory, based on its full package name. |
void |
returnTreeNode(IXholon node)
Return a TreeNode to the factory. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int RESOURCE_XHOLON
public static final int RESOURCE_XHOLONCLASS
public static final int RESOURCE_ACTIVITY
public static final int RESOURCE_STATEMACHINEENTITY
| Constructor Detail |
public TreeNodeFactoryStatic(java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass)
public TreeNodeFactoryStatic(int maxXholons,
int maxXholonClasses,
int maxActivities,
int maxStateMachineEntities,
java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass)
maxXholons - Maximum number of Xholons in the application.maxXholonClasses - Maximum number of XholonClasses in the application.maxActivities - Maximum number of Activities in the application.maxStateMachineEntities - Maximum number of StateMachineEntities in the application.xholonSubclass - Which subclass of Xholon should be instantiated.xholonClassSubclass - Which subclass of XholonClass should be instantiated.
public TreeNodeFactoryStatic(int maxXholons,
int maxXholonClasses,
int maxActivities,
int maxStateMachineEntities,
java.lang.Class xholonSubclass,
java.lang.Class xholonClassSubclass,
java.lang.Class activitySubclass)
maxXholons - Maximum number of Xholons in the application.maxXholonClasses - Maximum number of XholonClasses in the application.maxActivities - Maximum number of Activities in the application.maxStateMachineEntities - Maximum number of StateMachineEntities in the application.xholonSubclass - Which subclass of Xholon should be instantiated.xholonClassSubclass - Which subclass of XholonClass should be instantiated.activitySubclass - Which subclass of Activity should be instantiated.| Method Detail |
public int getNumAvailNodes(int resourceType)
ITreeNodeFactory
getNumAvailNodes in interface ITreeNodeFactoryresourceType - The type of node:
Xholon, XholonClass, StateMachineEntity, or Activity.
public IXholon getNode(java.lang.Class xholonSubclass)
ITreeNodeFactory
getNode in interface ITreeNodeFactoryxholonSubclass -
public IXholon getNode(int xhType)
ITreeNodeFactory
getNode in interface ITreeNodeFactoryxhType -
public IXholon getXholonNode()
ITreeNodeFactory
getXholonNode in interface ITreeNodeFactorypublic IXholon getXholonNode(java.lang.String implName)
ITreeNodeFactory
getXholonNode in interface ITreeNodeFactoryimplName - The name of a Java class.
public IXholonClass getXholonClassNode()
ITreeNodeFactory
getXholonClassNode in interface ITreeNodeFactorypublic Activity getActivityNode()
ITreeNodeFactory
getActivityNode in interface ITreeNodeFactorypublic StateMachineEntity getStateMachineEntityNode()
ITreeNodeFactory
getStateMachineEntityNode in interface ITreeNodeFactorypublic AbstractGrid getGridEntityNode()
ITreeNodeFactory
getGridEntityNode in interface ITreeNodeFactorypublic void returnTreeNode(IXholon node)
ITreeNodeFactory
returnTreeNode in interface ITreeNodeFactorynode - The TreeNode being returned.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||