|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.ci.XRuntime
public class XRuntime
Provider runtime information of an X Platform installation.
Nested Class Summary | |
---|---|
static class |
XRuntime.Optimization
Enumerates global optimizations |
Field Summary | |
---|---|
static String |
defaultAppGroup
The default application group. |
static String |
defaultAppName
The default application name. |
Constructor Summary | |
---|---|
XRuntime()
|
Method Summary | |
---|---|
static String |
getAppGroup()
Get the Neeve application group. |
static String |
getAppName()
Get the Neeve application name. |
static String |
getBinDirectory()
Get the runtime bin directory |
static String |
getConfigDirectory()
Get the runtime configuration directory. |
static String |
getDataDirectory()
Get the runtime data directory and create if absent. |
static String |
getDataDirectory(boolean createIfAbsent)
Get the runtime data directory. |
static String |
getFullAppName()
Get the fully qualifies Neeve application name. |
static String |
getJavaLibDirectory()
Get the java libs directory |
static String |
getLicenseDirectory()
Get the runtime license directory |
static String |
getLocalHost()
Get the local host name This method returns the name of the local host machine on which the Neeve application is running. |
static String |
getLogsDirectory()
Get the runtime trace log directory and create if absent. |
static String |
getLogsDirectory(boolean createIfAbsent)
Get the runtime trace log directory. |
static String |
getPid()
Get the process pid This method returns the process id of the current process |
static String |
getPlatform()
Get the runtime platform. |
static Properties |
getProps()
Get the Neeve runtime property set. |
static String |
getRootDirectory()
Get the runtime root directory. |
static String |
getUnmanagedJavaLibDirectory()
Get the java unmanaged lib directory |
static Object |
getValue(String name)
Get the value of a property from the environment props. |
static boolean |
getValue(String name,
boolean defValue)
Convenience method to return an environment property value as a boolean value |
static byte |
getValue(String name,
byte defValue)
Convenience method to return a property from the environment as a byte value. |
static double |
getValue(String name,
double defValue)
Convenience method to return a property from the environment as a double value. |
static float |
getValue(String name,
float defValue)
Convenience method to return a property from the environment as a float value. |
static int |
getValue(String name,
int defValue)
Convenience method to return a property from the environment as a int value. |
static long |
getValue(String name,
long defValue)
Convenience method to return a property from the environment as a int value. |
static short |
getValue(String name,
short defValue)
Convenience method to return a property from the environment as a float value. |
static String |
getValue(String name,
String defValue)
Convenience method to return a property value as a String value * |
static boolean |
isWindowsPlatform()
Get whether the an X Platform's runtime is installed on windows. |
static boolean |
optimizeForLatency()
Get whether system is globally configured to optimiize for latency |
static boolean |
optimizeForThroughput()
Get whether system is globally configured to optimiize for throughput |
static boolean |
optimizeMemoryUsage()
Gets whether or not memory usage optimizations should be enabled. |
static void |
setAppGroup(String val)
Set the Neeve application group. |
static void |
setAppName(String val)
Set the Neeve application name. |
static void |
setOptimization(XRuntime.Optimization val)
Set the global optimization to use |
static void |
updateProps(Properties val)
Update the Neeve runtime property set. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String defaultAppName
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.
public static final String defaultAppGroup
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.
Constructor Detail |
---|
public XRuntime()
Method Detail |
---|
public static final void setOptimization(XRuntime.Optimization val)
public static final String getRootDirectory()
This method returns the runtime root directory. The runtime root directory is stored in the NVROOT system property. In case the property is not set, the current directory ('.') is returned as the runtime root.
public static final String getBinDirectory()
public static final String getConfigDirectory()
public static final String getLicenseDirectory()
public static final String getJavaLibDirectory()
public static final String getUnmanagedJavaLibDirectory()
public static final String getDataDirectory(boolean createIfAbsent)
createIfAbsent
- Causes the directory to be created if absent,public static final String getDataDirectory()
This method is equivalent to the invoking getDataDirectory(true)
public static final String getLogsDirectory(boolean createIfAbsent)
createIfAbsent
- Causes the directory to be created if absent.public static final String getLogsDirectory()
This method is equivalent to the invoking getLogsDirectory(true)
public static final String getLocalHost()
This method returns the name of the local host machine on which the Neeve application is running.
public static final String getPid()
This method returns the process id of the current process
public static final void setAppGroup(String val)
val
- The group name to be set.
This method sets the Neeve application group. A Neeve application group partitions out participating Neeve applications into non-intersecting groups. Applications in different groups cannot communicate with each other.
public static final String getAppGroup()
This method returns the Neeve application 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
.
setAppGroup(java.lang.String)
public static final void setAppName(String val)
val
- The name to be set.
This method sets the Neeve application name. A Neeve application is a set of user classes managed by the same classloader that utilize the Neeve 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.
public static final String getAppName()
This method returns the Neeve application 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
.
setAppName(java.lang.String)
public static final String getFullAppName()
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]
getAppName()
,
getAppGroup()
public static final void updateProps(Properties val)
val
- The properties to update the property set with.
Several Neeve components support initialization and configuration using properties in the runtime property set. The application property set is maintained by this class. Upon startup, it is initialized with the Java runtime system property set and updated with properties specified in the property file referenced by the system property 'nv.app.propfile' if present. This method allows the user to further update the property set in case the user wishes to override the property values set using the above described manner.
This method will cause the Neeve 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.
public static final Properties getProps()
This method gets the Neeve runtime property set.
updateProps(java.util.Properties)
public static Object getValue(String name)
name
- The property name
public static boolean getValue(String name, boolean defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static double getValue(String name, double defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static float getValue(String name, float defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static long getValue(String name, long defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static int getValue(String name, int defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static short getValue(String name, short defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static byte getValue(String name, byte defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
public static String getValue(String name, String defValue)
name
- The property namedefValue
- The default property value to return in case the property
could not be found in the property table.
This method is a convenience method that returns a property value as a
string value. It uses getValue(java.lang.String)
to retrieve the property
value. The default value is returned in case the no property with the
provided name exists in the property table.
public static final String getPlatform()
This method returns the runtime platform. The runtime platform is stored in the NVPLATFORM system property. A null value is returned in case the platform is not set.
public static final boolean isWindowsPlatform()
public static final boolean optimizeForLatency()
public static final boolean optimizeForThroughput()
public static final boolean optimizeMemoryUsage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |