com.neeve.root
Class RootConfig.ObjectConfig

java.lang.Object
  extended by com.neeve.root.RootConfig.ObjectConfig
Enclosing class:
RootConfig

public static class RootConfig.ObjectConfig
extends Object

Class used to store information used to configure a Neeve object.

This class stores information used to configure a Neeve object being instantiated. When a new object (RootObject) is created, the constructor is passed an instance of this class that it uses to initialize itself.

The RootConfig class provides facilities to store objects of this class indexed by names (typically package names) that refer to groups of like objects. When an object is being instantiated, it queries RootConfig for a configuration object to use and supplies that object to RootObject for initialization.

The most common usage scenario is to store configuration objects indexed by package and use that object to configure all objects in that package. Furthermore, for performance reasons, the package normally caches the package configuration object to avoid table lookups for the creation of each object in the package.

Threading:
This class is safe for concurrent access by multiple threads.

Field Summary
 boolean checked
          Contains the object's checked mode of operation.
 String logger
          Contains the name of the logger to bind the object's tracer to
 String name
          The name of this object configuration object
 boolean threaded
          Contains the object's threaded mode of operation
 Tracer.Level traceLevel
          Contains the object's tracer level.
 
Method Summary
static Tracer createTracer(RootConfig.ObjectConfig config)
          Create a tracer from a object configuration object.
static RootConfig.ObjectConfig get(String name)
          Get an object configuration object for a named set of objects.
 String toString()
          Get a string representation of the config object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public String name
The name of this object configuration object


threaded

public boolean threaded
Contains the object's threaded mode of operation


checked

public boolean checked
Contains the object's checked mode of operation.


traceLevel

public Tracer.Level traceLevel
Contains the object's tracer level.


logger

public String logger
Contains the name of the logger to bind the object's tracer to

Method Detail

get

public static RootConfig.ObjectConfig get(String name)
Get an object configuration object for a named set of objects.

Parameters:
name - The name of the object set.
Returns:
Returns the created and initialized object configuration object

This method creates a new object configuration object. The method performs the following:
- Query RootConfig.getThreaded(java.lang.String), RootConfig.getChecked(java.lang.String), RootConfig.getTraceLevel(java.lang.String) and RootConfig.getLogger(java.lang.String) methods using the supplied name to initialize the object.
- Override the trace level set in the configuration object using the .trace application property.
- Set the trace logger in the configuration object as the logger with name=.

Threading:
This method is safe for concurrent access by multiple threads

createTracer

public static Tracer createTracer(RootConfig.ObjectConfig config)
Create a tracer from a object configuration object.

Parameters:
config - The configuration object to use to create the tracer.

This method creates a tracer object using information present in an object configuration object. This method is used by RootObject when creating the tracer for an object. It is present for use by other entities to create a tracer with the same level and bound to the same logger as that created by RootObject.

Threading:
This method is safe for concurrent access by multiple threads

toString

public final String toString()
Get a string representation of the config object

Overrides:
toString in class Object


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.