com.ibm.dtfj.image

Interface Image


  1. public interface Image

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.


Method Summary

Modifier and Type Method and Description
  1. void
close()
Close this image and any associated resources.
  1. 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.
  1. long
getCreationTime()
Determines when the image was created
  1. java.lang.String
getHostName()
Get the host name of the system where the image was running.
  1. long
getInstalledMemory()
Get the amount of physical memory (in bytes) installed in the system on which the image was running.
  1. java.util.Iterator
getIPAddresses()
The set of IP addresses (as InetAddresses) which the system running the image possessed.
  1. int
getProcessorCount()
Get the number of CPUs running in the system on which the image was running.
  1. java.lang.String
getProcessorSubType()
Get the precise model of the CPU.
  1. java.lang.String
getProcessorType()
Get the family name for the processor on which the image was running.
  1. java.lang.String
getSystemSubType()
Get the detailed name of the operating system.
  1. java.lang.String
getSystemType()
Get the family name for the operating system.

Method Detail

getAddressSpaces

  1. 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:

getProcessorType

  1. java.lang.String getProcessorType( )
  2. throws DataUnavailable
  3. 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

  1. java.lang.String getProcessorSubType( )
  2. throws DataUnavailable
  3. 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:

getProcessorCount

  1. int getProcessorCount()
  2. 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

  1. java.lang.String getSystemType( )
  2. throws DataUnavailable
  3. 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

  1. java.lang.String getSystemSubType( )
  2. throws DataUnavailable
  3. 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:

getInstalledMemory

  1. long getInstalledMemory()
  2. 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

  1. long getCreationTime()
  2. throws DataUnavailable
Determines when the image was created
Returns:
the time in milliseconds since 1970
Throws:

getHostName

  1. java.lang.String getHostName()
  2. throws DataUnavailable
  3. 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 host name or if the image predated this feature).
Since:
1.0

getIPAddresses

  1. java.util.Iterator getIPAddresses( )
  2. 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

close

  1. void close()

Close this image and any associated resources.

Some kinds of Image require the generation of temporary resources, for example temporary files created when reading core files and libraries from .zip archives. Ordinarily, these resources are deleted at JVM shutdown, but DTFJ applications may want to free them earlier. This method should only be called when the Image is no longer needed. After this method has been called, any objects associated with the image will be in an invalid state.

Since:
1.4