Class ToolsRegistry

java.lang.Object
com.ibm.jvm.dtfjview.tools.ToolsRegistry

public class ToolsRegistry extends Object
This class contains some static methods to invoke registered commands.

  • Method Details

    • initialize

      public static void initialize(Session session)
    • recordAndExecute

      public static void recordAndExecute(String command) throws CommandException
      To record the command in the history and then execute it. This method is called only right after the command is typed in from the console. No tools should call this method directly.

      Parameters:
      command - The command to be executed.

      Throws:
      CommandException
    • execute

      public static void execute(String command) throws CommandException
      To execute a command. Note: Default print stream will be used.

      Parameters:
      command - The command to be executed.
      Throws:
      CommandException
    • execute

      public static void execute(String command, String[] args) throws CommandException
      To execute a command with its arguments. Note: Default print stream will be used.

      Parameters:
      command - The command itself.
      args - The arguments to the command.
      Throws:
      CommandException
    • process

      public static void process(String command, PrintStream out) throws CommandException
      To execute a command. Note: this method should not be called directly by any DDR/Jdmpview commands; DDR/Jdmpview commands can use the one without the PrintStream parameter.

      Parameters:
      command - The command to be executed.
      out - The PrintStream

      Throws:
      CommandException
    • process

      public static String process(String command) throws CommandException
      To execute a command.

      Parameters:
      command - The command to be executed.

      Throws:
      CommandException
    • process

      public static void process(String command, String[] args, PrintStream out) throws CommandException
      To execute a command. Note: this method should not be called directly by any DDR/Jdmpview commands; DDR/Jdmpview commands can use the one without the PrintStream parameter.

      Parameters:
      command - The command to be executed.
      args - The arguments of the command.
      out - The PrintStream

      Throws:
      CommandException
    • process

      public static String process(String command, String[] args) throws CommandException
      To execute a command.

      Parameters:
      command - The command to be executed.
      args - The arguments of the command.

      Throws:
      CommandException
    • executeJdmpviewCommand

      public static void executeJdmpviewCommand(String jdmpviewCommand, PrintStream out)
      To execute a Jdmpview command.

      Parameters:
      jdmpviewCommand - The Jdmpview command.
      out - The PrintStream.
    • isPipeLineEnabled

      public static boolean isPipeLineEnabled(String command, String[] args)
      To check if a command is pipeline enabled.

      Parameters:
      command - The command to be checked.
      args - The arguments to the command.

      Returns:
      true if the command is pipeline enabled; false otherwise.
    • registerTool

      public static void registerTool(ITool tool)
      To register a tool.

      Parameters:
      tool - The tool to be added to the Store.
    • getAllTools

      public static List<ITool> getAllTools()
      To get all the registered tools.

      Returns:
      The list of registered tools.