|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.test.utils.JMXTestUtils
public class JMXTestUtils
JMX access for tests.
Field Summary | |
---|---|
(package private) JMXConnector |
_jmxc
|
(package private) MBeanServerConnection |
_mbsc
|
(package private) QpidBrokerTestCase |
_test
|
Constructor Summary | |
---|---|
JMXTestUtils(QpidBrokerTestCase test,
String user,
String password)
|
Method Summary | ||
---|---|---|
void |
close()
|
|
void |
createExchange(String virtualHostName,
String name,
String type,
boolean durable)
Create a non-durable exchange with the requested name |
|
void |
createQueue(String virtualHostName,
String name,
String owner,
boolean durable)
Create a non-durable queue (with no owner) that is named after the creating test. |
|
void |
deleteQueue(String virtualHostName,
String queueName)
Unregisters the Queue bindings, removes the subscriptions and unregisters from the managed objects. |
|
String[] |
getAvailableLoggerLevels()
Get list of available logger levels. |
|
org.apache.qpid.management.common.mbeans.ConfigurationManagement |
getConfigurationManagement()
|
|
ObjectName |
getExchangeObjectName(String virtualHostName,
String exchange)
Retrive the ObjectName for the given Exchange on a VirtualHost. |
|
org.apache.qpid.management.common.mbeans.LoggingManagement |
getLoggingManagement()
|
|
org.apache.qpid.management.common.mbeans.ManagedBroker |
getManagedBroker(String virtualHost)
|
|
org.apache.qpid.management.common.mbeans.ManagedExchange |
getManagedExchange(String exchangeName)
|
|
|
getManagedObject(Class<T> managedClass,
ObjectName objectName)
|
|
|
getManagedObject(Class<T> managedClass,
String queryString)
|
|
org.apache.qpid.management.common.mbeans.ManagedQueue |
getManagedQueue(String queueName)
|
|
ObjectName |
getQueueObjectName(String virtualHostName,
String queue)
Retrive the ObjectName for the given Queue on a Virtualhost. |
|
String |
getRuntimeRootLoggerLevel()
Get root logger level. |
|
org.apache.qpid.management.common.mbeans.UserManagement |
getUserManagement()
|
|
ObjectName |
getVirtualHostManagerObjectName(String vhostName)
Retrive the ObjectName for a Virtualhost. |
|
void |
open()
|
|
void |
reloadConfigFile()
Reload logging config file. |
|
void |
setRuntimeLoggerLevel(String logger,
String level)
Sets the logging level. |
|
void |
setRuntimeRootLoggerLevel(String level)
Set root logger level. |
|
void |
setUp()
|
|
void |
unregisterExchange(String virtualHostName,
String exchange)
Unregisters all the channels, queuebindings etc and unregisters this exchange from managed objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
QpidBrokerTestCase _test
MBeanServerConnection _mbsc
JMXConnector _jmxc
Constructor Detail |
---|
public JMXTestUtils(QpidBrokerTestCase test, String user, String password)
Method Detail |
---|
public void setUp() throws IOException, ConfigurationException, Exception
IOException
ConfigurationException
Exception
public void open() throws Exception
Exception
public void close() throws IOException
IOException
public void createExchange(String virtualHostName, String name, String type, boolean durable) throws JMException, IOException, MBeanException
JMException
- if a exchange with this name already exists
IOException
- if there is a problem with the JMX Connection
MBeanException
- if there is another problem creating the exchangepublic void createQueue(String virtualHostName, String name, String owner, boolean durable) throws JMException, MBeanException, IOException
JMException
- if a queue with this name already exists
IOException
- if there is a problem with the JMX Connection
MBeanException
- if there is another problem creating the exchangepublic void unregisterExchange(String virtualHostName, String exchange) throws IOException, JMException, MBeanException
JMException
- if an exchange with this name does not exist
IOException
- if there is a problem with the JMX Connection
MBeanException
- if there is another problem creating the exchangepublic void deleteQueue(String virtualHostName, String queueName) throws IOException, JMException, MBeanException
JMException
- if a queue with this name does not exist
IOException
- if there is a problem with the JMX Connection
MBeanException
- if there is another problem creating the exchangepublic void setRuntimeLoggerLevel(String logger, String level) throws IOException, JMException, MBeanException
JMException
IOException
- if there is a problem with the JMX Connection
MBeanException
public void reloadConfigFile() throws IOException, JMException, MBeanException
JMException
IOException
- if there is a problem with the JMX Connection
MBeanException
public String[] getAvailableLoggerLevels() throws IOException, JMException, MBeanException
JMException
IOException
- if there is a problem with the JMX Connection
MBeanException
public void setRuntimeRootLoggerLevel(String level) throws IOException, JMException, MBeanException
JMException
IOException
- if there is a problem with the JMX Connection
MBeanException
public String getRuntimeRootLoggerLevel() throws IOException, JMException, MBeanException
JMException
IOException
- if there is a problem with the JMX Connection
MBeanException
public ObjectName getVirtualHostManagerObjectName(String vhostName)
virtualHostName
- the VirtualHost to retrieve
public ObjectName getQueueObjectName(String virtualHostName, String queue)
virtualHostName
- the VirtualHost the Queue is onqueue
- The Queue to retireve
public ObjectName getExchangeObjectName(String virtualHostName, String exchange)
virtualHostName
- the VirtualHost the Exchange is onexchange
- the Exchange to retireve e.g. 'direct'
public <T> T getManagedObject(Class<T> managedClass, String queryString)
public <T> T getManagedObject(Class<T> managedClass, ObjectName objectName)
public org.apache.qpid.management.common.mbeans.ManagedBroker getManagedBroker(String virtualHost)
public org.apache.qpid.management.common.mbeans.ManagedExchange getManagedExchange(String exchangeName)
public org.apache.qpid.management.common.mbeans.ManagedQueue getManagedQueue(String queueName)
public org.apache.qpid.management.common.mbeans.LoggingManagement getLoggingManagement() throws MalformedObjectNameException
MalformedObjectNameException
public org.apache.qpid.management.common.mbeans.ConfigurationManagement getConfigurationManagement() throws MalformedObjectNameException
MalformedObjectNameException
public org.apache.qpid.management.common.mbeans.UserManagement getUserManagement() throws MalformedObjectNameException
MalformedObjectNameException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |