Class DTFJContext

java.lang.Object
com.ibm.java.diagnostics.utils.Context
com.ibm.java.diagnostics.utils.DTFJContext
All Implemented Interfaces:
IContext, IDTFJContext, PluginLoader
Direct Known Subclasses:
CombinedContext, EmptyDTFJContext

public class DTFJContext extends Context implements IDTFJContext, PluginLoader
A DTFJ context within which a DTFJ command executes
  • Constructor Details

  • Method Details

    • getProperties

      public Properties getProperties()
      Description copied from interface: IContext
      A set of defined properties. This typically includes information not on the DTFJ API, but may be useful for plugin processing e.g. a logging level. Tools such as jdmpview which provide not only the execution harness but some in-built commands use properties to pass information to commands.
      Specified by:
      getProperties in interface IContext
      Returns:
      properties that have currently been set
    • getMajorVersion

      public int getMajorVersion()
      Description copied from interface: IDTFJContext
      The major version of the DTFJ API for this context.
      Specified by:
      getMajorVersion in interface IDTFJContext
      Returns:
      major version number
    • getMinorVersion

      public int getMinorVersion()
      Description copied from interface: IDTFJContext
      The minor version of the DTFJ API for this context.
      Specified by:
      getMinorVersion in interface IDTFJContext
      Returns:
      minor version number
    • getAddressSpace

      public ImageAddressSpace getAddressSpace()
      Description copied from interface: IDTFJContext
      The address space for this context. This may or may not contain any processes.
      Specified by:
      getAddressSpace in interface IDTFJContext
      Returns:
      the image address space
    • getRuntime

      public JavaRuntime getRuntime()
      Description copied from interface: IDTFJContext
      The Java runtime for this context.
      Specified by:
      getRuntime in interface IDTFJContext
      Returns:
      the runtime or null if there is no runtime available
    • getProcess

      public ImageProcess getProcess()
      Description copied from interface: IDTFJContext
      The process for this context. A process may or may not contain a Java runtime.
      Specified by:
      getProcess in interface IDTFJContext
      Returns:
    • refresh

      public void refresh()
      Refresh this context.
      Specified by:
      refresh in interface IContext
    • getImage

      public DTFJImageBean getImage()
      Description copied from interface: IDTFJContext
      A simple Java bean which allows access to the data on DTFJ image interface. This removes the requirement to provide a command/plugin with a direct reference to the Image.
      Specified by:
      getImage in interface IDTFJContext
      Returns:
      the bean
    • hasPropertyBeenSet

      public boolean hasPropertyBeenSet(String name)
      Used to determine if a property has been set in the context property bag, and that the value of that property is TRUE
      Specified by:
      hasPropertyBeenSet in interface IDTFJContext
      Parameters:
      name - property name to check
      Returns:
      true if the property exists and Boolean.parseValue() returns true
    • getPlugins

      public ArrayList<PluginConfig> getPlugins()
      Specified by:
      getPlugins in interface PluginLoader
    • getPluginFailures

      public ArrayList<PluginConfig> getPluginFailures()
      Specified by:
      getPluginFailures in interface PluginLoader
    • loadPlugins

      public void loadPlugins() throws CommandException
      Specified by:
      loadPlugins in interface PluginLoader
      Throws:
      CommandException
    • getPluginClassloader

      public PluginLoader getPluginClassloader()
      Description copied from interface: IContext
      Gets the classloader which has been used to add plugins. This is typically done to add new plugins at runtime or refresh the existing list.
      Specified by:
      getPluginClassloader in interface IContext
      Returns:
      the classloader