org.ow2.jasmine.monitoring.mbeancmd
Class JmxAp

java.lang.Object
  extended by org.ow2.jasmine.monitoring.mbeancmd.JmxAp

public class JmxAp
extends java.lang.Object


Constructor Summary
JmxAp(CommandDispatcher cmdDispatcher)
          Creates a JmxAp that connects to the default target's JMX URL.
JmxAp(java.lang.String jmxUrl, CommandDispatcher cmdDispatcher)
          Creates a JmxAp that connects to a JMX URL.
 
Method Summary
 void closeMBeanServerConnection()
          In embedded mode only.
 CommandDispatcher getCmdDispatcher()
           
 java.lang.String getJmxUrl()
           
 javax.management.MBeanServerConnection getMBeanServerConnection()
          Get the JMX connection.
 javax.management.MBeanServerConnection getMBeanServerConnection(boolean usePool)
          Get the JMX connection.
 void releaseMBeanServerConnection()
          In embedded mode only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxAp

public JmxAp(java.lang.String jmxUrl,
             CommandDispatcher cmdDispatcher)
Creates a JmxAp that connects to a JMX URL.

Parameters:
jmxUrl - URL to connect to.
cmdDispatcher - CommandDispatcher instance corresponding to the current MBeanCmd command.

JmxAp

public JmxAp(CommandDispatcher cmdDispatcher)
Creates a JmxAp that connects to the default target's JMX URL.

Method Detail

getJmxUrl

public java.lang.String getJmxUrl()
Returns:
The String version of the JMX URL connected to.

getCmdDispatcher

public CommandDispatcher getCmdDispatcher()
Returns:
The commandDispatcher corresponding to the current MBeanCmd command.

getMBeanServerConnection

public javax.management.MBeanServerConnection getMBeanServerConnection(boolean usePool)
Get the JMX connection. If MBeanCmd is embedded, the connection will be provide by a factory previously get. If MBeanCmd runs in standalone mode or if the factory is null, a non managed JMX connection will be set.

Returns:
The MBeanServerConnection instance used to connect to the J2EE server via JMX.

getMBeanServerConnection

public javax.management.MBeanServerConnection getMBeanServerConnection()
Get the JMX connection. If MBeanCmd is embedded, the connection will be provide by a factory previously get. If MBeanCmd runs in standalone mode or if the factory is null, a non managed JMX connection will be set.

Returns:
The MBeanServerConnection instance used to connect to the J2EE server via JMX.

closeMBeanServerConnection

public void closeMBeanServerConnection()
In embedded mode only. Explicitly close the JMX connection in the pool, physically.


releaseMBeanServerConnection

public void releaseMBeanServerConnection()
In embedded mode only. Release the connection in the pool.



Copyright © 2010 OW2 Consortium. All Rights Reserved.