java.lang.Object
com.ibm.java.diagnostics.utils.Context
com.ibm.java.diagnostics.utils.DTFJContext
com.ibm.jvm.dtfjview.CombinedContext
- All Implemented Interfaces:
IContext
,IDTFJContext
,PluginLoader
,ICombinedContext
Wrapper class that takes an existing DTFJ context and augments
it with a DDR interactive context if one exists.
-
Field Summary
Fields declared in class com.ibm.java.diagnostics.utils.Context
commands, globalCommands, lastException, lastExecutedCommand, loader
-
Constructor Summary
ConstructorDescriptionCombinedContext
(int major, int minor, Image image, ImageAddressSpace space, ImageProcess proc, JavaRuntime rt, int id) -
Method Summary
Modifier and TypeMethodDescriptionvoid
displayContext
(IOutputManager out, boolean shortFormat) Display the contexts which are present in the core file currently being analysed.void
execute
(CommandParser command, PrintStream out) Execute the entered command line with the output sent to the supplied print stream.void
execute
(String cmdline, PrintStream out) Execute the entered command line with the output sent to the supplied print stream.void
execute
(String cmdline, String[] arguments, PrintStream out) Execute the entered command line with the output sent to the supplied print stream.A handle to the underlying DDR interactive sessionGet the exception which was thrown when trying to start a DDR interactive session.int
getID()
Contexts have a unique positive numeric identifier within a session.boolean
Flag to indicate if an associated DDR context is available as well as the DTFJ one.void
Called when this context becomes the current context to allow any initialisation to take place.void
setID
(int id) Sets the numeric ID for this context.void
startDDRInteractiveSession
(Image image, PrintStream out) Starts a DDR interactive session using the loaded image.Methods declared in class com.ibm.java.diagnostics.utils.DTFJContext
getAddressSpace, getImage, getMajorVersion, getMinorVersion, getPluginClassloader, getPluginFailures, getPlugins, getProcess, getProperties, getRuntime, hasPropertyBeenSet, loadPlugins, refresh
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
getCommands, getLastCommandException, getLastExecutedCommand, getPluginClassloader, getProperties, isCommandRecognised, refresh
Methods declared in interface com.ibm.java.diagnostics.utils.IDTFJContext
getAddressSpace, getImage, getMajorVersion, getMinorVersion, getProcess, getRuntime, hasPropertyBeenSet
-
Constructor Details
-
CombinedContext
public CombinedContext(int major, int minor, Image image, ImageAddressSpace space, ImageProcess proc, JavaRuntime rt, int id)
-
-
Method Details
-
getID
public int getID()Description copied from interface:ICombinedContext
Contexts have a unique positive numeric identifier within a session. This number always increases if new contexts are created via the open command rather than attempting to re-use any already used IDs.- Specified by:
getID
in interfaceICombinedContext
- Returns:
- the ID for this context
-
setID
public void setID(int id) Description copied from interface:ICombinedContext
Sets the numeric ID for this context. This setter is provided so as to allow context creation before assigning the ID. However once set it should not be changed. Later implementations may enforce this.- Specified by:
setID
in interfaceICombinedContext
- Parameters:
id
- the context ID
-
execute
Description copied from interface:IContext
Execute the entered command line with the output sent to the supplied print stream. -
execute
Description copied from interface:IContext
Execute the entered command line with the output sent to the supplied print stream. -
execute
Description copied from interface:IContext
Execute the entered command line with the output sent to the supplied print stream. -
startDDRInteractiveSession
Starts a DDR interactive session using the loaded image. If the core file is not DDR enabled this is recorded and future pling commands will not be available. In order to get access to the DDR classes it uses the Image classloader which, if the core file is DDR enabled, can see the required classes.- Parameters:
image
- Image created from the core file
-
getDDRIObject
Description copied from interface:ICombinedContext
A handle to the underlying DDR interactive session- Specified by:
getDDRIObject
in interfaceICombinedContext
- Returns:
- a valid session or null if the core file is not DDR enabled
-
getDDRStartupException
Description copied from interface:ICombinedContext
Get the exception which was thrown when trying to start a DDR interactive session.- Specified by:
getDDRStartupException
in interfaceICombinedContext
- Returns:
- the exception or null if the session started without error.
-
displayContext
Description copied from interface:ICombinedContext
Display the contexts which are present in the core file currently being analysed.- Specified by:
displayContext
in interfaceICombinedContext
shortFormat
- true for short format which just displays the first line of the java -version string
-
setAsCurrent
public void setAsCurrent()Description copied from interface:ICombinedContext
Called when this context becomes the current context to allow any initialisation to take place.- Specified by:
setAsCurrent
in interfaceICombinedContext
-
isDDRAvailable
public boolean isDDRAvailable()Description copied from interface:ICombinedContext
Flag to indicate if an associated DDR context is available as well as the DTFJ one.- Specified by:
isDDRAvailable
in interfaceICombinedContext
- Returns:
- true if DDR is available
-