Class CommandDispatcher
- java.lang.Object
-
- org.jolokia.jvmagent.client.command.CommandDispatcher
-
public class CommandDispatcher extends Object
Dispatch for various attach commands- Since:
- 12.08.11
- Author:
- roland
-
-
Constructor Summary
Constructors Constructor Description CommandDispatcher(OptionsAndArgs pOptions)
Dispatcher responsible for the execution of commands
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
dispatchCommand(Object pVm, VirtualMachineHandlerOperations pHandler)
Dispatch the commandstatic Set<String>
getAvailableCommands()
Get the list of available commandsstatic void
printHelp()
Print out usage message
-
-
-
Constructor Detail
-
CommandDispatcher
public CommandDispatcher(OptionsAndArgs pOptions)
Dispatcher responsible for the execution of commands- Parameters:
pOptions
- the parsed command line and options
-
-
Method Detail
-
dispatchCommand
public int dispatchCommand(Object pVm, VirtualMachineHandlerOperations pHandler) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException
Dispatch the command- Parameters:
pVm
- the virtual machine to attach to (typeless in order avoid direct references to the sun classes)pHandler
- handler for listing processes- Returns:
- the return code (0 or 1)
- Throws:
InvocationTargetException
NoSuchMethodException
IllegalAccessException
-
getAvailableCommands
public static Set<String> getAvailableCommands()
Get the list of available commands- Returns:
- set of available commands
-
printHelp
public static void printHelp()
Print out usage message
-
-