|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectconsciouscode.seedling.tree.GenericNode
consciouscode.seedling.tree.GenericBranch
consciouscode.seedling.scope.ScopeManager
public class ScopeManager
A branch that creates and manages ScopeRoots. Each scope that is
created is installed as a child of this branch. Attempts to install child
nodes in any other way will fail.
| Constructor Summary | |
|---|---|
ScopeManager(String managedScopeTag)
|
|
| Method Summary | |
|---|---|
ScopeRoot |
createScope()
Creates and installs a new child scope. |
protected String |
generateScopeName()
Generate a unique name for a new child scope. |
int |
getCreatedScopeCount()
Returns the number of child scopes this manager has created in its lifetime. |
String |
getManagedScopeTag()
Returns the scope tag that will be assigned to managed scopes. |
NodeProvider |
getScopeNodeProvider()
|
void |
nodeInstalled(NodeLocation location)
Register the Seedling address at which this node has been installed. |
void |
uninstallScope(ScopeRoot scope)
Uninstalls the given scope, stopping every node within it. |
| Methods inherited from class consciouscode.seedling.tree.GenericBranch |
|---|
addBranchChangeListener, availableChild, availableChildNames, constructChildBranch, createChild, fireChildInstalled, fireChildUninstalled, getChild, getInstalledNode, getLocalPathForChild, getLocalRoot, getNode, installChild, installedChild, installedChildNames, provisionChild, provisionChildBranch, startService, stopService, uninstallChild |
| Methods inherited from class consciouscode.seedling.tree.GenericNode |
|---|
getLog, getNodeLocation, getNodeName, getParentBranch, isLoggingDebug, setLog, setLoggingDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface consciouscode.seedling.BranchNode |
|---|
getLog |
| Methods inherited from interface consciouscode.seedling.LocatableNode |
|---|
getNodeLocation |
| Constructor Detail |
|---|
public ScopeManager(String managedScopeTag)
| Method Detail |
|---|
public void nodeInstalled(NodeLocation location)
GenericBranch
Note: This is not called setNodeLocation because
the location is not intended as a writable property.
This implementation calls super and then caches the location's
local root.
nodeInstalled in interface LocatableNodenodeInstalled in class GenericBranchlocation - is this node's new location. It must not be null.GenericBranch.getLocalRoot()public NodeProvider getScopeNodeProvider()
public String getManagedScopeTag()
public int getCreatedScopeCount()
public ScopeRoot createScope()
ScopeRoot.getNameInManager().
public void uninstallScope(ScopeRoot scope)
scope - may be null.protected String generateScopeName()
managedScopeTag with the
current createdScopeCount, but subclasses may override
this to implement a different naming convention.
Note that this method must always be called from within a block
synchronized on this.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||