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
A DTFJ context within which a DTFJ command executes
-
Field Summary
Fields declared in class com.ibm.java.diagnostics.utils.Context
commands, globalCommands, lastException, lastExecutedCommand, loader, logger
-
Constructor Summary
ConstructorDescriptionDTFJContext
(int major, int minor, Image image, ImageAddressSpace space, ImageProcess proc, JavaRuntime rt) -
Method Summary
Modifier and TypeMethodDescriptionThe address space for this context.getImage()
A simple Java bean which allows access to the data on DTFJ image interface.int
The major version of the DTFJ API for this context.int
The minor version of the DTFJ API for this context.Gets the classloader which has been used to add plugins.The process for this context.A set of defined properties.The Java runtime for this context.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 TRUEvoid
void
refresh()
Refresh this context.Methods declared in class com.ibm.java.diagnostics.utils.Context
addGlobalCommandsToContext, execute, execute, execute, getCommandNames, getCommands, getLastCommandException, getLastExecutedCommand, getPluginManager, isCommandRecognised
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface com.ibm.java.diagnostics.utils.IContext
execute, execute, execute, getCommands, getLastCommandException, getLastExecutedCommand, isCommandRecognised
-
Constructor Details
-
DTFJContext
public DTFJContext(int major, int minor, Image image, ImageAddressSpace space, ImageProcess proc, JavaRuntime rt)
-
-
Method Details
-
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 interfaceIContext
- 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 interfaceIDTFJContext
- 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 interfaceIDTFJContext
- Returns:
- minor version number
-
getAddressSpace
Description copied from interface:IDTFJContext
The address space for this context. This may or may not contain any processes.- Specified by:
getAddressSpace
in interfaceIDTFJContext
- Returns:
- the image address space
-
getRuntime
Description copied from interface:IDTFJContext
The Java runtime for this context.- Specified by:
getRuntime
in interfaceIDTFJContext
- Returns:
- the runtime or null if there is no runtime available
-
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 interfaceIDTFJContext
- Returns:
-
refresh
-
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 interfaceIDTFJContext
- Returns:
- the bean
-
hasPropertyBeenSet
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 interfaceIDTFJContext
- Parameters:
name
- property name to check- Returns:
- true if the property exists and Boolean.parseValue() returns true
-
getPlugins
- Specified by:
getPlugins
in interfacePluginLoader
-
getPluginFailures
- Specified by:
getPluginFailures
in interfacePluginLoader
-
loadPlugins
- Specified by:
loadPlugins
in interfacePluginLoader
- Throws:
CommandException
-
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 interfaceIContext
- Returns:
- the classloader
-