Package org.jivesoftware.openfire
Class JMXManager
java.lang.Object
org.jivesoftware.openfire.JMXManager
Manages the JMX configuration for Openfire.
- Author:
- Tom Evans
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SystemProperty<Boolean>Enables / disables JMX support in Openfire.static final SystemProperty<Integer>Defines the TCP port number for the JMX connector.static final SystemProperty<Boolean>Controls if the JMX connector is configured to require Openfire admin credentials. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.jmx.MBeanContainerstatic JMXManagerstatic intgetPort()Returns the port number for the JMX connector.static booleanReturns true if JMX support is enabled.static booleanisSecure()Returns true if the JMX connector is configured to require Openfire admin credentials.voidsetContainer(org.eclipse.jetty.jmx.MBeanContainer mbContainer) static voidsetEnabled(boolean enabled) static voidsetPort(int port) static voidsetSecure(boolean secure) static ObjectNametryRegister(Object mbean, String name) Registers a MBean in the platform MBean server, replacing any MBean that might have been registered earlier using the same object name.static voidtryRegister(Object mbean, ObjectName objectName) Registers a MBean in the platform MBean server, replacing any MBean that might have been registered earlier using the same object name.static voidtryUnregister(String name) Unregisters a MBean from the platform MBean server.static voidtryUnregister(ObjectName objectName) Unregisters a MBean from the platform MBean server.
-
Field Details
-
XMPP_JMX_ENABLED
Enables / disables JMX support in Openfire. This option can be configured via the admin console or by setting the following system property:xmpp.jmx.enabled=true (default: false) -
XMPP_JMX_SECURE
Controls if the JMX connector is configured to require Openfire admin credentials. This option can be configured via the admin console or by setting the following system property:xmpp.jmx.secure=false (default: true) -
XMPP_JMX_PORT
Defines the TCP port number for the JMX connector. This option can be configured via the admin console or by setting the following system property:xmpp.jmx.port=[port] (default: 1099)
-
-
Constructor Details
-
JMXManager
public JMXManager()
-
-
Method Details
-
isSecure
public static boolean isSecure()Returns true if the JMX connector is configured to require Openfire admin credentials. This option can be configured via the admin console or by setting the following system property:xmpp.jmx.secure=false (default: true)- Returns:
- true if the JMX connector requires authentication
-
setSecure
public static void setSecure(boolean secure) -
getPort
public static int getPort()Returns the port number for the JMX connector. This option can be configured via the admin console or by setting the following system property:xmpp.jmx.port=[port] (default: 1099)- Returns:
- Port number for the JMX connector
-
setPort
public static void setPort(int port) -
isEnabled
public static boolean isEnabled()Returns true if JMX support is enabled. This option can be configured via the admin console or by setting the following system property:xmpp.jmx.enabled=true (default: false)- Returns:
- true if JMX support is enabled
-
setEnabled
public static void setEnabled(boolean enabled) -
getInstance
-
getContainer
public org.eclipse.jetty.jmx.MBeanContainer getContainer() -
setContainer
public void setContainer(org.eclipse.jetty.jmx.MBeanContainer mbContainer) -
tryRegister
Registers a MBean in the platform MBean server, replacing any MBean that might have been registered earlier using the same object name. This method will log but otherwise ignore any exception that is thrown when registrating the bean.- Parameters:
mbean- The bean to registername- The identifier to register the bean under.- Returns:
- the ObjectName instance used the register the bean.
-
tryRegister
Registers a MBean in the platform MBean server, replacing any MBean that might have been registered earlier using the same object name. This method will log but otherwise ignore any exception that is thrown when registrating the bean.- Parameters:
mbean- The bean to registerobjectName- The identifier to register the bean under.
-
tryUnregister
Unregisters a MBean from the platform MBean server. This method will log but otherwise ignore any exception that is thrown when unregistering the bean.- Parameters:
name- The identifier that was used to register the bean under.
-
tryUnregister
Unregisters a MBean from the platform MBean server. This method will log but otherwise ignore any exception that is thrown when unregistering the bean.- Parameters:
objectName- The identifier that was used to register the bean under.
-