Class CommandLineJmxClient
java.lang.Object
com.j256.simplejmx.client.CommandLineJmxClient
Command-line client that can be used to support interactive or batch-file JMX operations. It can be used with the
Main class as a jmx client out of the SimpleJMX jar directly.
See the helpOutput() and exampleOutput() methods for
extensive help/usage information.
- Author:
- graywatson
-
Constructor Summary
ConstructorsConstructorDescriptionCommandLineJmxClient(int port) Create a command line interface connected to the local host at a certain port number.CommandLineJmxClient(JmxClient jmxClient) Create a command line interface on the passed in client.CommandLineJmxClient(String jmxUrl) Create a command line interface connected to a JMX server using the full JMX URL format.CommandLineJmxClient(String host, int port) Create a command line interface connected to a host and port combination.CommandLineJmxClient(InetAddress address, int port) Connect the client to an address and port combination. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the associated Jmx client.voidrunBatchFile(File batchFile) Read in commands from the batch-file and execute them.voidRun the Jmx command line client reading commands fromSystem.in.voidrunCommands(String[] commands) Run commands from the String array.
-
Constructor Details
-
CommandLineJmxClient
Create a command line interface on the passed in client. -
CommandLineJmxClient
Create a command line interface connected to the local host at a certain port number.- Throws:
JMException
-
CommandLineJmxClient
Create a command line interface connected to a host and port combination.- Throws:
JMException
-
CommandLineJmxClient
Connect the client to an address and port combination.- Throws:
JMException
-
CommandLineJmxClient
Create a command line interface connected to a JMX server using the full JMX URL format. The URL should look something like:
service:jmx:rmi:///jndi/rmi://hostName:portNumber/jmxrmi
- Throws:
JMException
-
-
Method Details
-
runCommands
Run commands from the String array.- Throws:
IOException
-
runBatchFile
Read in commands from the batch-file and execute them.- Throws:
IOException
-
runCommandLine
Run the Jmx command line client reading commands fromSystem.in.- Throws:
IOException
-
close
public void close()Close the associated Jmx client.
-