Package org.apache.synapse
Class JmxAdapter
- java.lang.Object
-
- org.apache.synapse.JmxAdapter
-
public class JmxAdapter extends Object
JMX Adaptor class providing a JMX server connector to be able to query MBeans via JConsole or any other JMX-compatible management solution.
The provided JNDI port will be used to create a local RMI registry. If no RMI port will be provided dynamic RMI ports will be used for remote MBean queries.
If the JMXAdaptor shall be used in a firewalled environment, additionally a fixed RMI port should be provided and both ports should be opened in the firewall.
JMX URL used if only JNDI port is provided:
service:jmx:rmi:///jndi/rmi://
: /synapse
JMX URL used if JNDI port and RMI port are provided:
service:jmx:rmi://
: /jndi/rmi:// : /synapse
-
-
Constructor Summary
Constructors Constructor Description JmxAdapter(org.apache.synapse.commons.jmx.JmxInformation jmxInformation)
Creates a new instance of a JMX Adaptor using the provided JMX information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.synapse.commons.jmx.JmxInformation
getJmxInformation()
boolean
isRunning()
Determines whether the JMX Connector server has been started and is running.void
setJmxInformation(org.apache.synapse.commons.jmx.JmxInformation jmxInformation)
void
start()
Lazily creates the RMI registry and starts the JMX connector server based on thevoid
stop()
Stops the JMX connector server.
-
-
-
Method Detail
-
start
public void start()
Lazily creates the RMI registry and starts the JMX connector server based on the- Throws:
SynapseException
- if the JMX configuration is erroneous and/or the connector server cannot be started
-
stop
public void stop()
Stops the JMX connector server.
-
isRunning
public boolean isRunning()
Determines whether the JMX Connector server has been started and is running.- Returns:
- true, if the connector server is running, otherwise false
-
getJmxInformation
public org.apache.synapse.commons.jmx.JmxInformation getJmxInformation()
-
setJmxInformation
public void setJmxInformation(org.apache.synapse.commons.jmx.JmxInformation jmxInformation)
-
-