com.ibm.dtfj.image
Interface Image


public interface Image

This class represents an entire operating system image (e.g. a core file). There are methods for accessing information about the architecture of the machine on which the image was running - hardware and operating system. The major feature, however, is the ability to iterate over the Address Spaces contained within the image.

Author:
pburka

Method Summary
 java.util.Iterator getAddressSpaces()
          Get the set of address spaces within the image - typically one but may be more on some systems such as Z/OS.
 long getCreationTime()
          Determines when the image was created
 java.lang.String getHostName()
          Get the host name of the system where the image was running.
 long getInstalledMemory()
          Get the amount of physical memory (in bytes) installed in the system on which the image was running.
 java.util.Iterator getIPAddresses()
          The set of IP addresses (as InetAddresses) which the system running the image possessed.
 int getProcessorCount()
          Get the number of CPUs running in the system on which the image was running.
 java.lang.String getProcessorSubType()
          Get the precise model of the CPU.
 java.lang.String getProcessorType()
          Get the family name for the processor on which the image was running.
 java.lang.String getSystemSubType()
          Get the detailed name of the operating system.
 java.lang.String getSystemType()
          Get the family name for the operating system.
 

Method Detail

getAddressSpaces

java.util.Iterator getAddressSpaces()
Get the set of address spaces within the image - typically one but may be more on some systems such as Z/OS.

Returns:
an Iterator which iterates over all of the address spaces described by this Image
See Also:
ImageAddressSpace, CorruptData

getProcessorType

java.lang.String getProcessorType()
                                  throws DataUnavailable,
                                         CorruptDataException
Get the family name for the processor on which the image was running.

Returns:
the family name for the processor on which the image was running. This corresponds to the value you would find in the "os.arch" System property.
Throws:
DataUnavailable - if this data cannot be inferred from this core type
CorruptDataException - if expected data cannot be read from the core

getProcessorSubType

java.lang.String getProcessorSubType()
                                     throws DataUnavailable,
                                            CorruptDataException
Get the precise model of the CPU.

Returns:
the precise model of the CPU (note that this can be an empty string but not null).
e.g. getProcessorType() will return "x86" where getProcessorSubType() may return "Pentium IV step 4"

Note that this value is platform and implementation dependent.

Throws:
DataUnavailable
CorruptDataException

getProcessorCount

int getProcessorCount()
                      throws DataUnavailable
Get the number of CPUs running in the system on which the image was running.

Returns:
the number of CPUs running in the system on which the image was running
Throws:
DataUnavailable - if the information cannot be provided

getSystemType

java.lang.String getSystemType()
                               throws DataUnavailable,
                                      CorruptDataException
Get the family name for the operating system.

Returns:
the family name for the operating system. This should be the same value that would be returned for the "os.name" system property
Throws:
DataUnavailable - if this data cannot be inferred from this core type
CorruptDataException - if expected data cannot be read from the core

getSystemSubType

java.lang.String getSystemSubType()
                                  throws DataUnavailable,
                                         CorruptDataException
Get the detailed name of the operating system.

Returns:
the detailed name of the operating system, or an empty string if this information is not available (null will never be returned). This should be the same value that would be returned for the "os.version" system property
Throws:
DataUnavailable
CorruptDataException

getInstalledMemory

long getInstalledMemory()
                        throws DataUnavailable
Get the amount of physical memory (in bytes) installed in the system on which the image was running.

Returns:
the amount of physical memory installed in the system on which the image was running. The return value is specified in bytes.
Throws:
DataUnavailable - if the information cannot be provided

getCreationTime

long getCreationTime()
                     throws DataUnavailable
Determines when the image was created

Returns:
the time in milliseconds since 1970
Throws:
DataUnavailable

getHostName

java.lang.String getHostName()
                             throws DataUnavailable,
                                    CorruptDataException
Get the host name of the system where the image was running.

Returns:
The host name of the system where the image was running. This string will be non-null and non-empty
Throws:
DataUnavailable - If the image did not provide this information (would happen if the system did not know its hostname or if the image pre-dated this feature).
CorruptDataException
Since:
1.0

getIPAddresses

java.util.Iterator getIPAddresses()
                                  throws DataUnavailable
The set of IP addresses (as InetAddresses) which the system running the image possessed.

Returns:
An Iterator over the IP addresses (as InetAddresses) which the system running the image possessed. The iterator will be non-null (but can be empty if the host is known to have no IP addresses).
Throws:
DataUnavailable - If the image did not provide this information (would happen if the system failed to look them up or if the image pre-dated this feature).
Since:
1.0
See Also:
java.net.InetAddress, CorruptData