public class JConnect extends Object implements NotificationListener
| Modifier and Type | Class and Description |
|---|---|
static class |
JConnect.ConsoleCompletor
The jline3 Completer implementation for JConnect.
This does the completion of the commands when users press tab. |
| Constructor and Description |
|---|
JConnect()
JConnect's constructor load the properties file.
This may exit the program if the configuration cannot be loaded. |
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(String value,
String type) |
String |
displaySignature(MBeanOperationInfo operation)
Get the signature of a JMX exposed method to display it into console.
|
int |
execute(String[] args)
The entry point of JConnect.
It opens the JMX connection and then execute the command given by args or start the interactive command line interface. |
MBeanInfo |
getBean(String name)
Get MBeanInfo of a bean.
|
Map<String,ObjectName> |
getBeans()
Get all the available beans.
|
void |
handleNotification(Notification notification,
Object handback) |
static void |
main(String[] args) |
void |
stop()
stop JConnect with the status code 0
|
void |
stop(int code)
stop JConnect with the specified exit code
|
public JConnect()
public void handleNotification(Notification notification, Object handback)
handleNotification in interface NotificationListenerpublic Map<String,ObjectName> getBeans() throws MalformedObjectNameException, IOException
MalformedObjectNameException - in case of a JMX issueIOException - in case of a JMX issuepublic MBeanInfo getBean(String name) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException, MalformedObjectNameException
name - the name of the been we are looking forInstanceNotFoundException - in case of a JMX issueIntrospectionException - in case of a JMX issueReflectionException - in case of a JMX issueIOException - in case of a JMX issueMalformedObjectNameException - in case of a JMX issuepublic String displaySignature(MBeanOperationInfo operation)
operation - the method to displaypublic void stop()
public void stop(int code)
code - the exit codepublic int execute(String[] args)
args - the arguments of an inline command to be executed. may be empty.public static void main(String[] args)
Copyright © 2022. All rights reserved.