org.jlf.config
Class AppInfo

java.lang.Object
  |
  +--org.jlf.config.AppInfo

public class AppInfo
extends java.lang.Object

AppInfo is a concrete class which delivers information about the Java Virtual Machine instance the application is running under. It encapsulates the application configuration properties implementation specific to the type of JVM you run the layered frameworks under. For example, the default application configuration properties class is org.jlf.config.AppConfigProperties. You can override that class by specifying a -D option on the java start command something like this (purely fictitious example):

 java ... -Dorg.jlf.config.appPropertiesClass=com.cti.config.WebSphereConfigProperties ...
 
and your subclass of AppConfigProperties named com.cti.config.WebSphereConfigProperties will kick in, which can override any of the AppConfigProperties class methods.

See Also:
AppConfigProperties

Field Summary
protected  AppConfigProperties appConfigPropertiesObject
          Holds the lazy-initialized instance of a subclass of AppConfigProperties which responds with all container-specific information.
static java.lang.String DEFAULT_APPLICATION_PROPERTIES_CLASS
          The default AppConfigProperties subclass if the above application property is not specified on the java start command.
static java.lang.String DEFAULT_SYSTEM_APPLICATION_PROPERTY_NAME
          The System property name (one of the -D options on the java command line start directive) which contains the name of the AppConfigProperties class.
static java.lang.String INFO_DELIMITER
          The string used to delimit concatenations of information
protected  java.lang.String localHostAddress
          Holds the lazy-initialized IP address of the local host.
protected  java.lang.String localHostName
          Holds the lazy-initialized host name of the local host.
protected static AppInfo singleton
          Singleton instance of this class.
 
Constructor Summary
protected AppInfo()
          Protect the singleton by scoping the constructor!
 
Method Summary
protected  java.lang.String getAppConfigPropertiesClass()
          Return the string for the subclass of AppConfigProperties which should be used to retrieve container-specific application properties.
protected  AppConfigProperties getAppConfigPropertiesObject()
          Return the subclass of AppConfigProperties which responds all container-specific application information.
 java.lang.String getApplicationConfigurationDirectory()
          Retrieves the main application configuration directory.
 java.lang.String getApplicationName()
          Retrieves the name for the application to uniquely identify it from other Java virtual machine instances running on the network.
 java.lang.String getApplicationPropertyFileName()
          Retrieves the name of the main application property file.
 java.lang.String getFileSeparatorString()
          Return the file separator string for the local machine.
static AppInfo getInstance()
          Class accessor which answers the singleton instance of this class for this image.
 java.lang.String getLocalHostAddress()
          Return the machine name of the local host
 java.lang.String getLocalHostName()
          Return the machine name of the local host
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFO_DELIMITER

public static final java.lang.String INFO_DELIMITER
The string used to delimit concatenations of information

See Also:
Constant Field Values

DEFAULT_SYSTEM_APPLICATION_PROPERTY_NAME

public static final java.lang.String DEFAULT_SYSTEM_APPLICATION_PROPERTY_NAME
The System property name (one of the -D options on the java command line start directive) which contains the name of the AppConfigProperties class. If this property is not found, the default below is used.

See Also:
Constant Field Values

DEFAULT_APPLICATION_PROPERTIES_CLASS

public static final java.lang.String DEFAULT_APPLICATION_PROPERTIES_CLASS
The default AppConfigProperties subclass if the above application property is not specified on the java start command.

See Also:
Constant Field Values

appConfigPropertiesObject

protected AppConfigProperties appConfigPropertiesObject
Holds the lazy-initialized instance of a subclass of AppConfigProperties which responds with all container-specific information.


localHostName

protected java.lang.String localHostName
Holds the lazy-initialized host name of the local host.


localHostAddress

protected java.lang.String localHostAddress
Holds the lazy-initialized IP address of the local host.


singleton

protected static AppInfo singleton
Singleton instance of this class.

Constructor Detail

AppInfo

protected AppInfo()
Protect the singleton by scoping the constructor!

Method Detail

getInstance

public static AppInfo getInstance()
Class accessor which answers the singleton instance of this class for this image.


getAppConfigPropertiesClass

protected java.lang.String getAppConfigPropertiesClass()
Return the string for the subclass of AppConfigProperties which should be used to retrieve container-specific application properties.


getAppConfigPropertiesObject

protected AppConfigProperties getAppConfigPropertiesObject()
Return the subclass of AppConfigProperties which responds all container-specific application information.


getApplicationConfigurationDirectory

public java.lang.String getApplicationConfigurationDirectory()
Retrieves the main application configuration directory. This directory should be the same directory as where the fully-qualified main application property file is located. This is a passthrough to the AppConfigProperties object.


getApplicationPropertyFileName

public java.lang.String getApplicationPropertyFileName()
Retrieves the name of the main application property file. This is a passthrough to the AppConfigProperties object.


getApplicationName

public java.lang.String getApplicationName()
Retrieves the name for the application to uniquely identify it from other Java virtual machine instances running on the network. This is a passthrough to the AppConfigProperties object.


getLocalHostAddress

public java.lang.String getLocalHostAddress()
Return the machine name of the local host


getLocalHostName

public java.lang.String getLocalHostName()
Return the machine name of the local host


getFileSeparatorString

public java.lang.String getFileSeparatorString()
Return the file separator string for the local machine.