org.sandev.basics.nodecommon
Interface SandRoot


public interface SandRoot

Methods required at the node execution root.

The SandRoot is responsible for instantiating node instances in the execution environment, through whatever control adaptor interface is appropriate. The root is the implicit base for every configuration, there is a separate root instance on each server machine to run the node(s) configured for that server.

The SandRoot may be declared as a node, in order to take advantage of the generators for the given platform. However it is not required to be a node, and is not considered part of the deployment configuration.


Method Summary
 CharSerializer getCharSerializer()
          Return the CharSerializer used for reading the config file.
 Configuration getConfiguration()
          A SandRoot must provide access to the current Configuration.
 Messageable getNode(java.lang.String instanceName)
          A SandRoot must provide access to any local node by instance name.
 java.lang.String getPropertiesPath()
          A SandRoot must provide the path to the directory where general property files are kept.
 SingletonAccessor getRootSingletonAccessor()
          Return a reference to the SingletonAccessor we are using.
 void setCharSerializer(CharSerializer serializer)
          Set the CharSerializer used for reading the config file.
 

Method Detail

getNode

Messageable getNode(java.lang.String instanceName)
A SandRoot must provide access to any local node by instance name. This method returns a reference to the specified instance provided that instance is local. Otherwise it returns null.


getCharSerializer

CharSerializer getCharSerializer()
Return the CharSerializer used for reading the config file.


setCharSerializer

void setCharSerializer(CharSerializer serializer)
Set the CharSerializer used for reading the config file.


getConfiguration

Configuration getConfiguration()
A SandRoot must provide access to the current Configuration. Typically the root loads the config.xml directly using the CharSerializer it was set up with.


getPropertiesPath

java.lang.String getPropertiesPath()
A SandRoot must provide the path to the directory where general property files are kept. General property files are those that are defined in the env directory of a project and declared via the sandenvfile tag in the build. If the underlying environment does not support property files (like if there is no file system), then this method returns null.

For ease of concatenation, the path includes the terminating File.separator character. So if you want a particular filename you can just concatenate directly.


getRootSingletonAccessor

SingletonAccessor getRootSingletonAccessor()
Return a reference to the SingletonAccessor we are using.