Interface Image

All Known Subinterfaces:
JCReleasingImage, ManagedImage, ReleasingImage
All Known Implementing Classes:
DTFJImageBean, Image, J9DDRImage, JCImage, PHDImage

public interface Image

Represents an entire operating system image (for example, 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
    Description
    void
    Close this image and any associated resources.
    Get the set of address spaces within the image - typically one but may be more on some systems such as Z/OS.
    long
    Get the time when the image was created
    long
    Get the value of the JVM's high-resolution timer when the image was created.
    Get the host name of the system where the image was running.
    long
    Get the amount of physical memory (in bytes) installed in the system on which the image was running.
    The set of IP addresses (as InetAddresses) which the system running the image possessed.
    int
    Get the number of CPUs running in the system on which the image was running.
    Get the precise model of the CPU.
    Get the family name for the processor on which the image was running.
    Gets the OS specific properties for this image.
    A unique identifier for the source of this image
    Get the detailed name of the operating system.
    Get the family name for the operating system.
    default boolean
    Is this image truncated (i.e. incomplete)?
  • Method Details

    • getAddressSpaces

      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

      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

      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

      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

      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
      Get the time when the image was created
      Returns:
      the image creation time in milliseconds since 1970
      Throws:
      DataUnavailable
    • getHostName

      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).
      CorruptDataException
      Since:
      1.0
    • getIPAddresses

      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:
    • close

      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
    • getProperties

      Properties getProperties()
      Gets the OS specific properties for this image.
      Returns:
      a set of OS specific properties
      Since:
      1.7
    • getSource

      URI getSource()
      A unique identifier for the source of this image
      Returns:
      URI for this image or null if this was not used when the image was created.
      Since:
      1.10
    • getCreationTimeNanos

      long getCreationTimeNanos() throws DataUnavailable, CorruptDataException
      Get the value of the JVM's high-resolution timer when the image was created.
      Returns:
      the value of the high-resolution timer, in nanoseconds
      Throws:
      DataUnavailable - if the image creation time is not available
      CorruptDataException - if the image creation time is corrupted
      Since:
      1.12
    • isTruncated

      default boolean isTruncated()
      Is this image truncated (i.e. incomplete)?