@Service public class JmxClient extends Object implements Jmx
JmxBuilder to define this service| Modifier and Type | Class and Description |
|---|---|
static class |
JmxClient.JmxPropertyOperation |
| Modifier and Type | Field and Description |
|---|---|
protected TasProperties |
properties |
| Constructor and Description |
|---|
JmxClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection() |
Object |
executeJMXMethod(String objectName,
String methodName,
Object... pArgs)
Use this to invoke operation methodName on mBean objectName
Example of usage: executeJMXMethod("Alfresco:Name=DatabaseInformation,Tool=SchemaValidator”, "validateSchema");
|
Object |
executeJMXMethod(String objectName,
String methodName,
String[] signature,
Object... pArgs)
Use this to invoke operation methodName with specified signature on mBean objectName
Example of usage: executeJMXMethod("Alfresco:Name=DatabaseInformation,Tool=SchemaExport", "dumpSchemaToXML", new String[]{"java.lang.String"}, "alf_node_, alf_acl_");
|
String |
getStringNameFromJmxObject(String objectName) |
boolean |
isJMXEnabled() |
Object |
readProperty(String objectName,
String attributeName)
Get server property value
Example:
Alfresco:Name=FileServerConfig, CIFSServerEnabled
getServerProperty("Alfresco:Name=FileServerConfig", "CIFSServerEnabled")
|
void |
refreshServerProperty(String objectName,
JmxClient.JmxPropertyOperation operation)
Use this to perform start/stop operation after changing server properties
|
Object |
writeProperty(String objectName,
String attributeName,
Object attributeValue)
Set property value on server side, for example if you want to disable email server, you'll use the following parameters:
setServerProperty("Alfresco:Type=Configuration,Category=email,id1=inbound", "email.server.enabled", "false") |
@Autowired protected TasProperties properties
public Object readProperty(String objectName, String attributeName) throws Exception
readProperty in interface JmxobjectName - attributeName - Exceptionpublic void closeConnection()
throws IOException
IOExceptionpublic Object writeProperty(String objectName, String attributeName, Object attributeValue) throws Exception
writeProperty in interface JmxobjectName - attributeName - attributeValue - Exceptionpublic String getStringNameFromJmxObject(String objectName) throws Exception
objectName - Exceptionpublic void refreshServerProperty(String objectName, JmxClient.JmxPropertyOperation operation) throws Exception
objectName - operation - MalformedObjectNameExceptionReflectionExceptionMBeanExceptionInstanceNotFoundExceptionExceptionpublic boolean isJMXEnabled()
isJMXEnabled in interface Jmxpublic Object executeJMXMethod(String objectName, String methodName, Object... pArgs) throws Exception
executeJMXMethod in interface JmxobjectName - methodName - pArgs - Exceptionpublic Object executeJMXMethod(String objectName, String methodName, String[] signature, Object... pArgs) throws Exception
objectName - methodName - signature - pArgs - ExceptionCopyright © 2005–2019 Alfresco Software. All rights reserved.