- 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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
execute(String command)
To execute a command.static void
execute(String command, String[] args)
To execute a command with its arguments.static void
executeJdmpviewCommand(String jdmpviewCommand, PrintStream out)
To execute a Jdmpview command.static List<ITool>
getAllTools()
To get all the registered tools.static void
initialize(Session session)
static boolean
isPipeLineEnabled(String command, String[] args)
To check if a command is pipeline enabled.static String
process(String command)
To execute a command.static void
process(String command, PrintStream out)
To execute a command.static String
process(String command, String[] args)
To execute a command.static void
process(String command, String[] args, PrintStream out)
To execute a command.static void
recordAndExecute(String command)
To record the command in the history and then execute it.static void
registerTool(ITool tool)
To register a tool.
-
-
-
Method Detail
-
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.
-
-