com.esf.core.system.manager.service
Interface ISystemManagerService


public interface ISystemManagerService

Service to provide basic system information including Operating System information, JVM information, and filesystem information. This service is also used to load bundles within ESF. This service is directly tied to the ESF configuration directory level services.xml file that is used to provide information to this service with regard to what bundles to load. An example services.xml file is provided with this package. Any services referenced within that file will be loaded at startup of ESF along with their dependencies. Copyright � 2009 Eurotech Inc. All rights reserved.


Field Summary
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
 
Method Summary
 java.util.ArrayList getAllComPorts()
          gets the complete list of COM ports based on the configuration
 java.lang.String getCompany()
          gets the company name this device was set up for.
 java.lang.String getEntity()
          gets the broker 'entity' this device was set up for.
 java.lang.String getEsfBaseBundleDirectory()
          gets the location where the ESF base bundle directory is.
 java.lang.String getEsfConfigDirectory()
          gets the location where all ESF specific non-volatile configuration files and bundle specific files are stored.
 java.lang.String getEsfHome()
          gets the location where the ESF root directory is stored in the filesystem
 java.lang.String getFileSeparator()
          gets the system file separator used by the filesystem
 java.lang.String getJavaHome()
          gets the location where the JVM is stored in the filesystem
 java.lang.String getJavaProfile()
          gets the Java Virtual Machine profile that is currently being used
 java.lang.String getJavaVmName()
          gets the Java Virtual Machine name that is currently being used
 java.lang.String getJavaVmVersion()
          gets the Java Virtual Machine version that is currently being used
 java.util.ArrayList getNativeEthernetInterfaces()
          gets the complete list of Ethernet interfaces based on the configuration
 java.lang.String getOsArch()
          gets the Operating System architecture for the system
 java.lang.String getOsDistro()
          gets the Operating System Distribution name if appropriate
 java.lang.String getOsDistroVersion()
          gets the Operating System Distribution version if appropriate
 java.lang.String getOsName()
          gets the Operating System name for the system
 java.lang.String getOsVersion()
          gets the Operating System version for the system
 java.lang.String getPlatform()
          /** gets the platform name ESF is running on.
 java.lang.String getPrimaryMacAddress()
          gets the 'primary' MAC address of this device.
 java.lang.String getProductVersion()
          gets the product version for this unit.
 java.lang.String getProject()
          gets the project name this device was set up for
 java.lang.String getTemporaryConfigDirectory()
          gets the location where all volatile ESF specific configuration and status information should be stored.
 void reboot()
          reboots the device
 

Field Detail

SERVICE_NAME

static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.

Method Detail

getEntity

java.lang.String getEntity()
                           throws java.lang.Exception
gets the broker 'entity' this device was set up for. This is usually the company that designed the pub/sub namespace.

Returns:
the entity name this device was set up for.
Throws:
java.lang.Exception

getCompany

java.lang.String getCompany()
                            throws java.lang.Exception
gets the company name this device was set up for.

Returns:
the company name this device was set up for.
Throws:
java.lang.Exception

getProject

java.lang.String getProject()
                            throws java.lang.Exception
gets the project name this device was set up for

Returns:
the project name this device was set up for
Throws:
java.lang.Exception

getPrimaryMacAddress

java.lang.String getPrimaryMacAddress()
                                      throws java.lang.Exception
gets the 'primary' MAC address of this device. This is generally the MAC address of eth0

Returns:
the primary MAC address of this device.
Throws:
java.lang.Exception

getPlatform

java.lang.String getPlatform()
                             throws java.lang.Exception
/** gets the platform name ESF is running on. This could be catalyst, duracor1200, helios, isis, proteus, etc

Returns:
the platform name
Throws:
java.lang.Exception - if the platform is undefined or can not be determined

getOsArch

java.lang.String getOsArch()
gets the Operating System architecture for the system

Returns:
the Operating System architecture as defined by the Java System property os.arch

getOsName

java.lang.String getOsName()
gets the Operating System name for the system

Returns:
the Operating System name as defined by the Java System property os.name

getOsVersion

java.lang.String getOsVersion()
gets the Operating System version for the system

Returns:
the Operating System version as defined by the Java System property os.version

getOsDistro

java.lang.String getOsDistro()
                             throws java.lang.Exception
gets the Operating System Distribution name if appropriate

Returns:
a String representing the Operating System Distribution name if appropriate
Throws:
java.lang.Exception - if the Distribution name is undefined or not applicable

getOsDistroVersion

java.lang.String getOsDistroVersion()
                                    throws java.lang.Exception
gets the Operating System Distribution version if appropriate

Returns:
a String representing the Operating System Distribution version if appropriate
Throws:
java.lang.Exception - if the Distribution version is undefined or not applicable

getJavaVmName

java.lang.String getJavaVmName()
gets the Java Virtual Machine name that is currently being used

Returns:
the Java Virtual Machine name as defined by the Java System property java.vm.name

getJavaVmVersion

java.lang.String getJavaVmVersion()
gets the Java Virtual Machine version that is currently being used

Returns:
the Java Virtual Machine version as defined by the Java System property java.vm.version

getJavaProfile

java.lang.String getJavaProfile()
gets the Java Virtual Machine profile that is currently being used

Returns:
the Java Virtual Machine profile currently being used

getFileSeparator

java.lang.String getFileSeparator()
gets the system file separator used by the filesystem

Returns:
the system file separator used by the system

getJavaHome

java.lang.String getJavaHome()
gets the location where the JVM is stored in the filesystem

Returns:
the location of the root JVM directory

getProductVersion

java.lang.String getProductVersion()
                                   throws java.lang.Exception
gets the product version for this unit. The product version is defined as the version in the release.xml file. The release.xml file is stored in /etc/esf/ and has the format: PRODUCT_NAME_release-VERSION-VERSION_NUMBER.xml For example this is a valid product name: helios_denali_release-1.2.3.xml. The version number would be 1.2.3. This would be an invalid product name: my-product-name_release-1.2.3.xml. This is because the product name has '-' characters in it. They should be '_' to be valid. So, the correct representation would be: my_product_name_release-1.2.3.xml. It's version number would be 1.2.3. The use of '-' characters should only be used immediately before the version number and the use of '.' characters should only be used immediately after the version number.

Returns:
The version number as denoted in the release.xml file.
Throws:
java.lang.Exception

getEsfHome

java.lang.String getEsfHome()
gets the location where the ESF root directory is stored in the filesystem

Returns:
the root ESF directory

getEsfBaseBundleDirectory

java.lang.String getEsfBaseBundleDirectory()
gets the location where the ESF base bundle directory is. This is the location where all ESF specific bundles are stored in the filesystem.

Returns:
the root ESF base bundle directory

getEsfConfigDirectory

java.lang.String getEsfConfigDirectory()
gets the location where all ESF specific non-volatile configuration files and bundle specific files are stored. The convention is for each bundle that has filesystem dependencies is for those filesystem components to be stored in the configuration directory root followed by a file seperator followed by the project name that needs some configuration. This will keep seperate configuration components tied to their appropriate projects.

Returns:
the location of the ESF configuration directory root

getTemporaryConfigDirectory

java.lang.String getTemporaryConfigDirectory()
gets the location where all volatile ESF specific configuration and status information should be stored. The convention is for each bundle that has filesystem dependencies is for those filesystem components to be stored in the configuration directory root followed by a file separator followed by the project name that needs some configuration. This will keep separate configuration components tied to their appropriate projects.

Returns:
the location of the volatile ESF configuration and status directory root

getNativeEthernetInterfaces

java.util.ArrayList getNativeEthernetInterfaces()
                                                throws java.lang.Exception
gets the complete list of Ethernet interfaces based on the configuration

Returns:
an ArrayList of Strings defining the Ethernet Interfaces on board.
Throws:
java.lang.Exception - if the platform is undefined or can not be determined

getAllComPorts

java.util.ArrayList getAllComPorts()
gets the complete list of COM ports based on the configuration

Returns:
an ArrayList of com.esf.core.system.manager.service.EsfSerialPort Objects defining sthe COM ports on board

reboot

void reboot()
            throws java.lang.Exception
reboots the device

Throws:
java.lang.Exception