com.neeve.config
Class ConfigProcess

java.lang.Object
  extended by com.neeve.config.ConfigProcess

public final class ConfigProcess
extends Object

Manages application configuration properties that have process scope.

Application properties of process scope are comprised of all properties specifed as JVM system properties. Two special properties included in this set of propeties are the 'application name' and 'application group' properties.


Field Summary
static String defaultAppGroup
          The default application group.
static String defaultAppName
          The default application name.
 
Constructor Summary
ConfigProcess()
           
 
Method Summary
static String getAppGroup()
          Get an application's group.
static String getAppName()
          Get the application's name.
static String getFullAppName()
          Get the fully qualified application name.
static Properties getProps()
          Get the property set.
static void setAppGroup(String val)
          Set the application's group.
static void setAppName(String val)
          Set the application's name.
static void updateProps(Properties val)
          Update the runtime property set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultAppName

public static final String defaultAppName
The default application name.

The value in this constant is returned by getAppName() in case the user has not specified the application name via the nv.app.name runtime property or the setAppName(java.lang.String) method.

See Also:
Constant Field Values

defaultAppGroup

public static final String defaultAppGroup
The default application group.

The value in this constant is returned by getAppGroup() in case the user has not specified the application name via the nv.app.group runtime property or the setAppGroup(java.lang.String) method.

See Also:
Constant Field Values
Constructor Detail

ConfigProcess

public ConfigProcess()
Method Detail

setAppGroup

public static final void setAppGroup(String val)
Set the application's group.

Parameters:
val - The group name to be set.

This method sets the application's group name. Application groups partition participating X Platform applications into non-intersecting groups. Applications in different groups cannot communicate with each other.

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

getAppGroup

public static final String getAppGroup()
Get an application's group.

Returns:
The application group.

This method returns an application's group. The application group is initialized on startup from the nv.app.group application property and can be overriden via the setAppGroup(java.lang.String) method. The default value for the application name is defaultAppGroup.

See Also:
setAppGroup(java.lang.String)
Threading:
This method is safe for concurrent access by multiple threads

setAppName

public static final void setAppName(String val)
Set the application's name.

Parameters:
val - The name to be set.

This method sets the name of the application. An X application is a set of user classes managed by the same classloader that utilize the X Platform runtime to perform their function. The application name is a human readable name primarily for tracing and debugging purposes used to identify such a set of classes.

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

getAppName

public static final String getAppName()
Get the application's name.

Returns:
The application name.

This method returns the application's name. The application name is initialized on startup from the nv.app.name application property and can be overriden via the setAppName(java.lang.String) method. The default value for the application name is defaultAppName.

See Also:
setAppName(java.lang.String)
Threading:
This method is safe for concurrent access by multiple threads

getFullAppName

public static final String getFullAppName()
Get the fully qualified application name.

Returns:
The fully qualifies name.

This method concatenates the application name and group to produce the fully qualified application name. The format of the fully qualified name is [group]:[name]

See Also:
getAppName(), getAppGroup()
Threading:
This method is safe for concurrent access by multiple threads

updateProps

public static final void updateProps(Properties val)
Update the runtime property set.

Parameters:
val - The properties to update the property set with.

This method refreshes the process scoped application properties

This method will cause the application name to be reloaded using the 'nv.app.name' property in the new property set. The application name remains unchanged in case the property is absent from the new property set.

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

getProps

public static final Properties getProps()
Get the property set.

Returns:
The application's process scoped property set.
See Also:
updateProps(java.util.Properties)
Threading:
This method is safe for concurrent access by multiple threads


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