Interface ICombinedContext
- All Superinterfaces:
IContext, IDTFJContext
- All Known Implementing Classes:
CombinedContext
A combined context is an extended DTFJ context which also contains a DDR context.
This is to allow commands to be passed down the stack starting with DTFJ and then
moving to DDR if necessary.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayContext(IOutputManager out, boolean shortFormat) Display the contexts which are present in the core file currently being analysed.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.Methods declared in interface IContext
execute, execute, execute, getCommands, getLastCommandException, getLastExecutedCommand, getPluginClassloader, getProperties, isCommandRecognised, refreshModifier and TypeMethodDescriptionvoidexecute(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.Returns a list of commands which are available for this contextProvides access to any uncaught exceptions thrown when the last command was executed.The last command which was successfully executed by the context.Gets the classloader which has been used to add plugins.A set of defined properties.booleanisCommandRecognised(String command) Allows to check if the given command will be executed (i.e. if there is a command that will accept the string) without actually executing it, avoiding error messages etc.voidrefresh()Refreshes the context, this will perform actions such as rescanning the plugin path or other initialization tasks.Methods declared in interface IDTFJContext
getAddressSpace, getImage, getMajorVersion, getMinorVersion, getProcess, getRuntime, hasPropertyBeenSetModifier 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.The process for this context.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 TRUE
-
Method Details
-
getID
int getID()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.- Returns:
- the ID for this context
-
setID
void setID(int id) 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.- Parameters:
id- the context ID
-
getDDRIObject
Object getDDRIObject()A handle to the underlying DDR interactive session- Returns:
- a valid session or null if the core file is not DDR enabled
-
getDDRStartupException
Throwable getDDRStartupException()Get the exception which was thrown when trying to start a DDR interactive session.- Returns:
- the exception or null if the session started without error.
-
displayContext
Display the contexts which are present in the core file currently being analysed.- Parameters:
shortFormat- true for short format which just displays the first line of the java -version string
-
setAsCurrent
void setAsCurrent()Called when this context becomes the current context to allow any initialisation to take place. -
isDDRAvailable
boolean isDDRAvailable()Flag to indicate if an associated DDR context is available as well as the DTFJ one.- Returns:
- true if DDR is available
-