Class Session

java.lang.Object
com.ibm.jvm.dtfjview.Session
All Implemented Interfaces:
ISession

public class Session extends Object implements ISession
  • Field Details

  • Method Details

    • getInstance

      public static ISession getInstance(String[] args)
      Factory method for creating new sessions.
      Parameters:
      args - any session arguments
      Returns:
      the session
    • getOutputManager

      public IOutputManager getOutputManager()
      Description copied from interface: ISession
      The instance which is managing all registered output channels.
      Specified by:
      getOutputManager in interface ISession
      Returns:
      the manager
    • getCharset

      public String getCharset()
    • getCurrentContext

      public ICombinedContext getCurrentContext()
      Description copied from interface: ISession
      The currently selected context against which commands will be executed.
      Specified by:
      getCurrentContext in interface ISession
      Returns:
      the current context, it may or may not have DDR interactive support
    • getContextManager

      public ISessionContextManager getContextManager()
      Description copied from interface: ISession
      Get the manager which is managing this context within this session.
      Specified by:
      getContextManager in interface ISession
      Returns:
      the context manager
    • setContext

      public void setContext(int id) throws CommandException
      Description copied from interface: ISession
      Set the context within which subsequent commands will be executed.
      Specified by:
      setContext in interface ISession
      Parameters:
      id - context ID
      Throws:
      CommandException - thrown if an invalid context ID is specified
    • setContext

      public void setContext(ICombinedContext switchTo) throws CommandException
      Description copied from interface: ISession
      Set the context within which subsequent commands will be executed.
      Specified by:
      setContext in interface ISession
      Parameters:
      switchTo - the context to switch to
      Throws:
      CommandException - thrown if the switch fails. The underlying reason will be in the logs.
    • showContexts

      public void showContexts(boolean shortFormat)
      Description copied from interface: ISession
      Display the contexts which are present in the core file currently being analysed.
      Specified by:
      showContexts in interface ISession
      Parameters:
      shortFormat - true for short format which just displays the first line of the java -version string
    • findAndSetContextWithJVM

      public void findAndSetContextWithJVM()
      Description copied from interface: ISession
      Convenience method which instructs the session to search through all the available contexts and set the current one to the first one it finds with a non-corrupt DTFJ JavaRuntime in it.
      Specified by:
      findAndSetContextWithJVM in interface ISession
    • run

      public void run()
    • execute

      public void execute(String line, PrintStream redirector)
      Execute a command line.

      Parameters:
      line - The command line to be executed.
      redirector - The PrintStream.
    • execute

      public void execute(String line)
      Description copied from interface: ISession
      Executes the supplied command. Output will be written via the IOutputManager to all registered channels.
      Specified by:
      execute in interface ISession
      Parameters:
      line - the command and any parameters to execute.