consciouscode.seedling.tree
Class GenericNode

java.lang.Object
  extended by consciouscode.seedling.tree.GenericNode
All Implemented Interfaces:
LocatableNode
Direct Known Subclasses:
AbstractPeriodicTask, Clock, ConsoleServlet, EmptyBranch, GenericBranch, NodeIndex, ShutdownNode, TestRunnerNode, WikiServlet

public class GenericNode
extends Object
implements LocatableNode

A basic Seedling node that provides location and logging features.

If this node is installed with no log configured, it will inherit the log used by the parent branch.


Constructor Summary
GenericNode()
           
 
Method Summary
 RootNode getLocalRoot()
          Get the root of this node's local scope.
 Log getLog()
           
 NodeLocation getNodeLocation()
          Returns the location of this node.
 String getNodeName()
          Gets the name of this node, as per it's location.
 BranchNode getParentBranch()
          Gets the branch containing this node, as per it's location.
 boolean isLoggingDebug()
          Deprecated. but here to provide visibility in console.
 void nodeInstalled(NodeLocation location)
          Register the Seedling address at which this node has been installed.
 void setLog(Log log)
           
 void setLoggingDebug(boolean value)
          Deprecated. but we can't remove it until we have LoggingInjector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericNode

public GenericNode()
Method Detail

getLocalRoot

public RootNode getLocalRoot()
Get the root of this node's local scope.

See Also:
BranchNode.getLocalRoot()

nodeInstalled

public void nodeInstalled(NodeLocation location)
Description copied from interface: LocatableNode
Register the Seedling address at which this node has been installed. This is called immediately after the node has been installed into the tree.

Note: This is not called setNodeLocation because the location is not intended as a writable property.

Specified by:
nodeInstalled in interface LocatableNode
Parameters:
location - is this node's new location. It must not be null.

getNodeLocation

public final NodeLocation getNodeLocation()
Description copied from interface: LocatableNode
Returns the location of this node. The NodeLocation can be used to access the node's name, parent branch, and path.

Specified by:
getNodeLocation in interface LocatableNode
Returns:
this node's location, or null if the node has not been installed into a Seedling.

getParentBranch

public final BranchNode getParentBranch()
Gets the branch containing this node, as per it's location.

See Also:
NodeLocation.getParentBranch()

getNodeName

public final String getNodeName()
Gets the name of this node, as per it's location.

See Also:
NodeReference.getNodeName()

getLog

public Log getLog()

setLog

public void setLog(Log log)

isLoggingDebug

@Deprecated
public boolean isLoggingDebug()
Deprecated. but here to provide visibility in console.


setLoggingDebug

@Deprecated
public void setLoggingDebug(boolean value)
Deprecated. but we can't remove it until we have LoggingInjector.



Copyright © 2001–2012 Todd V. Jonker. All Rights Reserved.