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
ConstructorsConstructorDescriptionCombinedContext(int major, int minor, Image image, ImageAddressSpace space, ImageProcess proc, JavaRuntime rt, int id) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayContext(IOutputManager out, boolean shortFormat) Display the contexts which are present in the core file currently being analysed.voidexecute(CommandParser command, PrintStream out) Execute the entered command line with the output sent to the supplied print stream.voidexecute(String cmdline, PrintStream out) Execute the entered command line with the output sent to the supplied print stream.voidexecute(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.intgetID()Contexts have a unique positive numeric identifier within a session.booleanFlag to indicate if an associated DDR context is available as well as the DTFJ one.voidCalled when this context becomes the current context to allow any initialisation to take place.voidsetID(int id) Sets the numeric ID for this context.voidstartDDRInteractiveSession(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, refreshMethods 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
getCommands, getLastCommandException, getLastExecutedCommand, getPluginClassloader, getProperties, isCommandRecognised, refreshMethods 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:ICombinedContextContexts 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:
getIDin interfaceICombinedContext- Returns:
- the ID for this context
-
setID
public void setID(int id) Description copied from interface:ICombinedContextSets 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:
setIDin interfaceICombinedContext- Parameters:
id- the context ID
-
execute
Description copied from interface:IContextExecute the entered command line with the output sent to the supplied print stream. -
execute
Description copied from interface:IContextExecute the entered command line with the output sent to the supplied print stream. -
execute
Description copied from interface:IContextExecute 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:ICombinedContextA handle to the underlying DDR interactive session- Specified by:
getDDRIObjectin interfaceICombinedContext- Returns:
- a valid session or null if the core file is not DDR enabled
-
getDDRStartupException
Description copied from interface:ICombinedContextGet the exception which was thrown when trying to start a DDR interactive session.- Specified by:
getDDRStartupExceptionin interfaceICombinedContext- Returns:
- the exception or null if the session started without error.
-
displayContext
Description copied from interface:ICombinedContextDisplay the contexts which are present in the core file currently being analysed.- Specified by:
displayContextin interfaceICombinedContext- Parameters:
shortFormat- true for short format which just displays the first line of the java -version string
-
setAsCurrent
public void setAsCurrent()Description copied from interface:ICombinedContextCalled when this context becomes the current context to allow any initialisation to take place.- Specified by:
setAsCurrentin interfaceICombinedContext
-
isDDRAvailable
public boolean isDDRAvailable()Description copied from interface:ICombinedContextFlag to indicate if an associated DDR context is available as well as the DTFJ one.- Specified by:
isDDRAvailablein interfaceICombinedContext- Returns:
- true if DDR is available
-