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
ConstructorsConstructorDescriptionDTFJContext(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.intThe major version of the DTFJ API for this context.intThe 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.booleanhasPropertyBeenSet(String name) Used to determine if a property has been set in the context property bag, and that the value of that property is TRUEvoidvoidrefresh()Refresh this context.Methods declared in class com.ibm.java.diagnostics.utils.Context
addGlobalCommandsToContext, execute, execute, execute, getCommandNames, getCommands, getLastCommandException, getLastExecutedCommand, getPluginManager, isCommandRecognisedMethods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IContextA 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:
getPropertiesin interfaceIContext- Returns:
- properties that have currently been set
-
getMajorVersion
public int getMajorVersion()Description copied from interface:IDTFJContextThe major version of the DTFJ API for this context.- Specified by:
getMajorVersionin interfaceIDTFJContext- Returns:
- major version number
-
getMinorVersion
public int getMinorVersion()Description copied from interface:IDTFJContextThe minor version of the DTFJ API for this context.- Specified by:
getMinorVersionin interfaceIDTFJContext- Returns:
- minor version number
-
getAddressSpace
Description copied from interface:IDTFJContextThe address space for this context. This may or may not contain any processes.- Specified by:
getAddressSpacein interfaceIDTFJContext- Returns:
- the image address space
-
getRuntime
Description copied from interface:IDTFJContextThe Java runtime for this context.- Specified by:
getRuntimein interfaceIDTFJContext- Returns:
- the runtime or null if there is no runtime available
-
getProcess
Description copied from interface:IDTFJContextThe process for this context. A process may or may not contain a Java runtime.- Specified by:
getProcessin interfaceIDTFJContext- Returns:
-
refresh
public void refresh()Refresh this context. -
getImage
Description copied from interface:IDTFJContextA 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:
getImagein 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:
hasPropertyBeenSetin interfaceIDTFJContext- Parameters:
name- property name to check- Returns:
- true if the property exists and Boolean.parseValue() returns true
-
getPlugins
- Specified by:
getPluginsin interfacePluginLoader
-
getPluginFailures
- Specified by:
getPluginFailuresin interfacePluginLoader
-
loadPlugins
- Specified by:
loadPluginsin interfacePluginLoader- Throws:
CommandException
-
getPluginClassloader
Description copied from interface:IContextGets 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:
getPluginClassloaderin interfaceIContext- Returns:
- the classloader
-