[hornetq-commits] JBoss hornetq SVN: r7956 - in trunk: src/main/org/hornetq/core/management and 11 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Sep 15 05:23:09 EDT 2009
Author: jmesnil
Date: 2009-09-15 05:23:07 -0400 (Tue, 15 Sep 2009)
New Revision: 7956
Added:
trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java
Modified:
trunk/docs/user-manual/en/management.xml
trunk/src/main/org/hornetq/core/management/HornetQServerControl.java
trunk/src/main/org/hornetq/core/management/ManagementService.java
trunk/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java
trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
trunk/src/main/org/hornetq/core/management/jmx/impl/ReplicationAwareHornetQServerControlWrapper.java
trunk/src/main/org/hornetq/jms/server/JMSServerManager.java
trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java
trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java
trunk/src/main/org/hornetq/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java
trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/QueueDeployerTest.java
trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingImplTest.java
Log:
HORNETQ-131: List of the destinations (queues and topics) currently deployed
* added attributes to list queues/addresses from Core HornetQServerControl
* added attributes to list queues/topics/connection factories from JMSServerControl
* doc + tests
Modified: trunk/docs/user-manual/en/management.xml
===================================================================
--- trunk/docs/user-manual/en/management.xml 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/docs/user-manual/en/management.xml 2009-09-15 09:23:07 UTC (rev 7956)
@@ -75,7 +75,9 @@
<title>Core Server Management</title>
<itemizedlist>
<listitem>
- <para>Creating, deploying and destroying queues</para>
+ <para>Listing, creating, deploying and destroying queues</para>
+ <para>A list of deployed core queues can be retrieved using the
+ <literal>getQueueNames()</literal> method.</para>
<para>Core queues can be created or destroyed using the management operations
<literal>createQueue()</literal> or <literal>deployQueue()</literal> or
<literal>destroyQueue()</literal>)on the <literal
@@ -296,7 +298,9 @@
>jms.server</literal>).</para>
<itemizedlist>
<listitem>
- <para>Creating/destroying connection factories</para>
+ <para>Listing, creating, destroying connection factories</para>
+ <para>Names of the deployed connection factories can be retrieved by the
+ <literal>getConnectionFactoryNames()</literal> method.</para>
<para>JMS connection factories can be created or destroyed using the <literal
>createConnectionFactory()</literal> methods or <literal
>destroyConnectionFactory()</literal> methods. These connection factories
@@ -312,14 +316,18 @@
for a list of the transport parameters)</para>
</listitem>
<listitem>
- <para>Creating/destroying queues</para>
+ <para>Listing, creating, destroying queues</para>
+ <para>Names of the deployed JMS queues can be retrieved by the
+ <literal>getQueueNames()</literal> method.</para>
<para>JMS queues can be created or destroyed using the <literal
>createQueue()</literal> methods or <literal>destroyQueue()</literal>
methods. These queues are bound to JNDI so that JMS clients can look them
up</para>
</listitem>
<listitem>
- <para>Creating/destroying topics</para>
+ <para>Listing, creating/destroying topics</para>
+ <para>Names of the deployed topics can be retrieved by the
+ <literal>getTopicNames()</literal> method.</para>
<para>JMS topics can be created or destroyed using the <literal
>createTopic()</literal> or <literal>destroyTopic()</literal> methods. These
topics are bound to JNDI so that JMS clients can look them up</para>
Modified: trunk/src/main/org/hornetq/core/management/HornetQServerControl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/HornetQServerControl.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/core/management/HornetQServerControl.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -116,7 +116,11 @@
Object[] getConnectors() throws Exception;
String getConnectorsAsJSON() throws Exception;
+
+ String[] getAddressNames();
+ String[] getQueueNames();
+
// Operations ----------------------------------------------------
@Operation(desc = "Create a queue with the specified address", impact = ACTION)
Modified: trunk/src/main/org/hornetq/core/management/ManagementService.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/ManagementService.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/core/management/ManagementService.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -127,6 +127,7 @@
Object getResource(String resourceName);
+ Object[] getResources(Class<?> resourceType);
+
ServerMessage handleMessage(ServerMessage message) throws Exception;
-
}
Modified: trunk/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/core/management/impl/HornetQServerControlImpl.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -36,8 +36,10 @@
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.core.exception.HornetQException;
import org.hornetq.core.logging.Logger;
+import org.hornetq.core.management.AddressControl;
import org.hornetq.core.management.HornetQServerControl;
import org.hornetq.core.management.NotificationType;
+import org.hornetq.core.management.QueueControl;
import org.hornetq.core.messagecounter.MessageCounterManager;
import org.hornetq.core.messagecounter.impl.MessageCounterManagerImpl;
import org.hornetq.core.postoffice.PostOffice;
@@ -252,6 +254,32 @@
server.createQueue(new SimpleString(address), new SimpleString(name), filter, durable, false);
}
+ public String[] getQueueNames()
+ {
+ Object[] queues = server.getManagementService().getResources(QueueControl.class);
+ String[] names = new String[queues.length];
+ for (int i = 0; i < queues.length; i++)
+ {
+ QueueControl queue = (QueueControl)queues[i];
+ names[i] = queue.getName();
+ }
+
+ return names;
+ }
+
+ public String[] getAddressNames()
+ {
+ Object[] addresses = server.getManagementService().getResources(AddressControl.class);
+ String[] names = new String[addresses.length];
+ for (int i = 0; i < addresses.length; i++)
+ {
+ AddressControl address = (AddressControl)addresses[i];
+ names[i] = address.getAddress();
+ }
+
+ return names;
+ }
+
public void destroyQueue(final String name) throws Exception
{
SimpleString queueName = new SimpleString(name);
Modified: trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/core/management/impl/ManagementServiceImpl.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -21,6 +21,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.Map.Entry;
import java.util.concurrent.ScheduledExecutorService;
import javax.management.MBeanServer;
@@ -50,6 +51,7 @@
import org.hornetq.core.management.Notification;
import org.hornetq.core.management.NotificationListener;
import org.hornetq.core.management.ObjectNames;
+import org.hornetq.core.management.QueueControl;
import org.hornetq.core.management.ReplicationOperationInvoker;
import org.hornetq.core.management.ResourceNames;
import org.hornetq.core.management.jmx.impl.ReplicationAwareAddressControlWrapper;
@@ -255,14 +257,17 @@
address.toString(),
postOffice,
addressSettingsRepository);
- MessageCounter counter = new MessageCounter(queue.getName().toString(),
- null,
- queueControl,
- false,
- queue.isDurable(),
- messageCounterManager.getMaxDayCount());
- queueControl.setMessageCounter(counter);
- messageCounterManager.registerMessageCounter(queue.getName().toString(), counter);
+ if (messageCounterManager != null)
+ {
+ MessageCounter counter = new MessageCounter(queue.getName().toString(),
+ null,
+ queueControl,
+ false,
+ queue.isDurable(),
+ messageCounterManager.getMaxDayCount());
+ queueControl.setMessageCounter(counter);
+ messageCounterManager.registerMessageCounter(queue.getName().toString(), counter);
+ }
ObjectName objectName = ObjectNames.getQueueObjectName(address, queue.getName());
registerInJMX(objectName, new ReplicationAwareQueueControlWrapper(queueControl, replicationInvoker));
registerInRegistry(ResourceNames.CORE_QUEUE + queue.getName(), queueControl);
@@ -489,6 +494,19 @@
{
return registry.get(resourceName);
}
+
+ public Object[] getResources(Class<?> resourceType)
+ {
+ List<Object> resources = new ArrayList<Object>();
+ for (Object entry : registry.values())
+ {
+ if (resourceType.isAssignableFrom(entry.getClass()))
+ {
+ resources.add(entry);
+ }
+ }
+ return (Object[])resources.toArray(new Object[resources.size()]);
+ }
private Set<ObjectName> registeredNames = new HashSet<ObjectName>();
Modified: trunk/src/main/org/hornetq/core/management/jmx/impl/ReplicationAwareHornetQServerControlWrapper.java
===================================================================
--- trunk/src/main/org/hornetq/core/management/jmx/impl/ReplicationAwareHornetQServerControlWrapper.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/core/management/jmx/impl/ReplicationAwareHornetQServerControlWrapper.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -226,6 +226,16 @@
{
return localControl.getConnectorsAsJSON();
}
+
+ public String[] getAddressNames()
+ {
+ return localControl.getAddressNames();
+ }
+
+ public String[] getQueueNames()
+ {
+ return localControl.getQueueNames();
+ }
public void sendQueueInfoToQueue(final String queueName, final String address) throws Exception
{
Modified: trunk/src/main/org/hornetq/jms/server/JMSServerManager.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/JMSServerManager.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/jms/server/JMSServerManager.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -19,6 +19,7 @@
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.core.server.HornetQComponent;
+import org.hornetq.core.server.HornetQServer;
import org.hornetq.utils.Pair;
/**
@@ -220,4 +221,9 @@
String[] listSessions(String connectionID) throws Exception;
void setContext(final Context context);
+
+ /**
+ * @return
+ */
+ HornetQServer getHornetQServer();
}
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -195,6 +195,11 @@
// JMSServerManager implementation -------------------------------
+ public HornetQServer getHornetQServer()
+ {
+ return server;
+ }
+
public synchronized void setContext(final Context context)
{
this.context = context;
Modified: trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/jms/server/management/JMSServerControl.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -36,6 +36,12 @@
String getVersion();
+ String[] getTopicNames();
+
+ String[] getQueueNames();
+
+ String[] getConnectionFactoryNames();
+
// Operations ----------------------------------------------------
@Operation(desc = "Create a JMS Queue", impact = ACTION)
Modified: trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/jms/server/management/impl/JMSServerControlImpl.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -29,7 +29,10 @@
import org.hornetq.core.client.management.impl.ManagementHelper;
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.jms.server.JMSServerManager;
+import org.hornetq.jms.server.management.ConnectionFactoryControl;
+import org.hornetq.jms.server.management.JMSQueueControl;
import org.hornetq.jms.server.management.JMSServerControl;
+import org.hornetq.jms.server.management.TopicControl;
import org.hornetq.utils.Pair;
/**
@@ -669,6 +672,42 @@
return server.getVersion();
}
+ public String[] getQueueNames()
+ {
+ Object[] queueControls = server.getHornetQServer().getManagementService().getResources(JMSQueueControl.class);
+ String[] names = new String[queueControls.length];
+ for (int i = 0; i < queueControls.length; i++)
+ {
+ JMSQueueControl queueControl = (JMSQueueControl)queueControls[i];
+ names[i] = queueControl.getName();
+ }
+ return names;
+ }
+
+ public String[] getTopicNames()
+ {
+ Object[] topicControls = server.getHornetQServer().getManagementService().getResources(TopicControl.class);
+ String[] names = new String[topicControls.length];
+ for (int i = 0; i < topicControls.length; i++)
+ {
+ TopicControl topicControl = (TopicControl)topicControls[i];
+ names[i] = topicControl.getName();
+ }
+ return names;
+ }
+
+ public String[] getConnectionFactoryNames()
+ {
+ Object[] cfControls = server.getHornetQServer().getManagementService().getResources(ConnectionFactoryControl.class);
+ String[] names = new String[cfControls.length];
+ for (int i = 0; i < cfControls.length; i++)
+ {
+ ConnectionFactoryControl cfControl = (ConnectionFactoryControl)cfControls[i];
+ names[i] = cfControl.getName();
+ }
+ return names;
+ }
+
// NotificationEmitter implementation ----------------------------
public void removeNotificationListener(final NotificationListener listener,
Modified: trunk/src/main/org/hornetq/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/src/main/org/hornetq/jms/server/management/jmx/impl/ReplicationAwareJMSServerControlWrapper.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -532,7 +532,22 @@
{
return localControl.isStarted();
}
+
+ public String[] getQueueNames()
+ {
+ return localControl.getQueueNames();
+ }
+
+ public String[] getTopicNames()
+ {
+ return localControl.getTopicNames();
+ }
+ public String[] getConnectionFactoryNames()
+ {
+ return localControl.getConnectionFactoryNames();
+ }
+
public String[] listConnectionIDs() throws Exception
{
return localControl.listConnectionIDs();
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -128,7 +128,26 @@
checkNoBinding(context, queueJNDIBinding);
checkNoResource(ObjectNames.getJMSQueueObjectName(queueName));
}
+
+ public void testGetQueueNames() throws Exception
+ {
+ String queueJNDIBinding = randomString();
+ String queueName = randomString();
+ JMSServerControl control = createManagementControl();
+ assertEquals(0, control.getQueueNames().length);
+
+ control.createQueue(queueName, queueJNDIBinding);
+
+ String[] names = control.getQueueNames();
+ assertEquals(1, names.length);
+ assertEquals(queueName, names[0]);
+
+ control.destroyQueue(queueName);
+
+ assertEquals(0, control.getQueueNames().length);
+ }
+
public void testCreateTopic() throws Exception
{
String topicJNDIBinding = randomString();
@@ -166,7 +185,26 @@
checkNoBinding(context, topicJNDIBinding);
checkNoResource(ObjectNames.getJMSTopicObjectName(topicName));
}
+
+ public void testGetTopicNames() throws Exception
+ {
+ String topicJNDIBinding = randomString();
+ String topicName = randomString();
+ JMSServerControl control = createManagementControl();
+ assertEquals(0, control.getTopicNames().length);
+
+ control.createTopic(topicName, topicJNDIBinding);
+
+ String[] names = control.getTopicNames();
+ assertEquals(1, names.length);
+ assertEquals(topicName, names[0]);
+
+ control.destroyTopic(topicName);
+
+ assertEquals(0, control.getTopicNames().length);
+ }
+
public void testCreateConnectionFactory_1() throws Exception
{
doCreateConnectionFactory(new ConnectionFactoryCreator()
@@ -528,7 +566,26 @@
}
}
+
+ public void testGetConnectionFactoryNames() throws Exception
+ {
+ String cfBinding = randomString();
+ String cfName = randomString();
+ JMSServerControl control = createManagementControl();
+ assertEquals(0, control.getConnectionFactoryNames().length);
+
+ TransportConfiguration tcLive = new TransportConfiguration(InVMConnectorFactory.class.getName());
+ control.createConnectionFactory(cfName, tcLive.getFactoryClassName(), tcLive.getParams(), new String[] {cfBinding});
+
+ String[] cfNames = control.getConnectionFactoryNames();
+ assertEquals(1, cfNames.length);
+ assertEquals(cfName, cfNames[0]);
+
+ control.destroyConnectionFactory(cfName);
+ assertEquals(0, control.getConnectionFactoryNames().length);
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -46,6 +46,16 @@
// Static --------------------------------------------------------
+ private static String[] toStringArray(Object[] res)
+ {
+ String[] names = new String[res.length];
+ for (int i = 0; i < res.length; i++)
+ {
+ names[i] = res[i].toString();
+ }
+ return names;
+ }
+
// Constructors --------------------------------------------------
// JMSServerControlTest overrides --------------------------------
@@ -575,7 +585,22 @@
{
return (Boolean)proxy.retrieveAttributeValue("started");
}
+
+ public String[] getQueueNames()
+ {
+ return toStringArray((Object[])proxy.retrieveAttributeValue("queueNames"));
+ }
+ public String[] getTopicNames()
+ {
+ return toStringArray((Object[])proxy.retrieveAttributeValue("topicNames"));
+ }
+
+ public String[] getConnectionFactoryNames()
+ {
+ return toStringArray((Object[])proxy.retrieveAttributeValue("connectionFactoryNames"));
+ }
+
public String[] listConnectionIDs() throws Exception
{
return (String[])proxy.invokeOperation("listConnectionIDs");
@@ -595,7 +620,7 @@
{
return (String[])proxy.invokeOperation("listSessions", connectionID);
}
-
+
};
}
// Public --------------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -59,6 +59,20 @@
// Static --------------------------------------------------------
+ private static boolean contains(String name, String[] strings)
+ {
+ boolean found = false;
+ for (String str : strings)
+ {
+ if (name.equals(str))
+ {
+ found = true;
+ break;
+ }
+ }
+ return found;
+ }
+
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@@ -209,7 +223,45 @@
checkNoResource(ObjectNames.getQueueObjectName(address, name));
}
+
+ public void testGetQueueNames() throws Exception
+ {
+ SimpleString address = RandomUtil.randomSimpleString();
+ SimpleString name = RandomUtil.randomSimpleString();
+ HornetQServerControl serverControl = createManagementControl();
+
+ // due to replication, there can be another queue created for replicating
+ // management operations
+
+ assertFalse(contains(name.toString(), serverControl.getQueueNames()));
+
+ serverControl.createQueue(address.toString(), name.toString());
+ assertTrue(contains(name.toString(), serverControl.getQueueNames()));
+
+ serverControl.destroyQueue(name.toString());
+ assertFalse(contains(name.toString(), serverControl.getQueueNames()));
+ }
+
+ public void testGetAddressNames() throws Exception
+ {
+ SimpleString address = RandomUtil.randomSimpleString();
+ SimpleString name = RandomUtil.randomSimpleString();
+
+ HornetQServerControl serverControl = createManagementControl();
+
+ // due to replication, there can be another queue created for replicating
+ // management operations
+
+ assertFalse(contains(address.toString(), serverControl.getAddressNames()));
+
+ serverControl.createQueue(address.toString(), name.toString());
+ assertTrue(contains(address.toString(), serverControl.getAddressNames()));
+
+ serverControl.destroyQueue(name.toString());
+ assertFalse(contains(address.toString(), serverControl.getAddressNames()));
+ }
+
public void testMessageCounterMaxDayCount() throws Exception
{
HornetQServerControl serverControl = createManagementControl();
Modified: trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/integration/management/HornetQServerControlUsingCoreTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -36,6 +36,16 @@
// Static --------------------------------------------------------
+ private static String[] toStringArray(Object[] res)
+ {
+ String[] names = new String[res.length];
+ for (int i = 0; i < res.length; i++)
+ {
+ names[i] = res[i].toString();
+ }
+ return names;
+ }
+
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@@ -68,7 +78,6 @@
@Override
protected HornetQServerControl createManagementControl() throws Exception
{
-
return new HornetQServerControl()
{
private final CoreMessagingProxy proxy = new CoreMessagingProxy(session,
@@ -153,6 +162,16 @@
{
return (String)proxy.retrieveAttributeValue("connectorsAsJSON");
}
+
+ public String[] getAddressNames()
+ {
+ return toStringArray((Object[])proxy.retrieveAttributeValue("addressNames"));
+ }
+
+ public String[] getQueueNames()
+ {
+ return toStringArray((Object[])proxy.retrieveAttributeValue("queueNames"));
+ }
public int getIDCacheSize()
{
@@ -161,13 +180,7 @@
public String[] getInterceptorClassNames()
{
- Object[] res = (Object[])proxy.retrieveAttributeValue("interceptorClassNames");
- String[] names = new String[res.length];
- for (int i = 0; i < res.length; i++)
- {
- names[i] = res[i].toString();
- }
- return names;
+ return toStringArray((Object[])proxy.retrieveAttributeValue("interceptorClassNames"));
}
public String getJournalDirectory()
Modified: trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/integration/management/ManagementServiceImplTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -13,6 +13,7 @@
package org.hornetq.tests.integration.management;
+import static org.hornetq.tests.util.RandomUtil.randomSimpleString;
import static org.hornetq.tests.util.RandomUtil.randomString;
import org.hornetq.core.buffers.ChannelBuffers;
@@ -20,13 +21,20 @@
import org.hornetq.core.config.Configuration;
import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.logging.Logger;
+import org.hornetq.core.management.AddressControl;
+import org.hornetq.core.management.QueueControl;
import org.hornetq.core.management.ResourceNames;
+import org.hornetq.core.management.impl.ManagementServiceImpl;
import org.hornetq.core.remoting.spi.HornetQBuffer;
import org.hornetq.core.server.HornetQ;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.Queue;
import org.hornetq.core.server.ServerMessage;
import org.hornetq.core.server.impl.ServerMessageImpl;
+import org.hornetq.tests.integration.server.FakeStorageManager;
+import org.hornetq.tests.unit.core.postoffice.impl.FakeQueue;
import org.hornetq.tests.util.UnitTestCase;
+import org.hornetq.utils.SimpleString;
/*
* @author <a href="mailto:jmesnil at redhat.com">Jeff Mesnil</a>
@@ -144,6 +152,31 @@
assertNotNull(ManagementHelper.getResult(reply));
server.stop();
}
+
+ public void testGetResources() throws Exception
+ {
+ Configuration conf = new ConfigurationImpl();
+ conf.setJMXManagementEnabled(false);
+ ManagementServiceImpl managementService = new ManagementServiceImpl(null, conf, -1);
+
+ SimpleString address = randomSimpleString();
+ managementService.registerAddress(address);
+ Queue queue = new FakeQueue(randomSimpleString());
+ managementService.registerQueue(queue, randomSimpleString(), new FakeStorageManager());
+
+ Object[] addresses = managementService.getResources(AddressControl.class);
+ assertEquals(1, addresses.length);
+ assertTrue(addresses[0] instanceof AddressControl);
+ AddressControl addressControl = (AddressControl)addresses[0];
+ assertEquals(address.toString(), addressControl.getAddress());
+
+ Object[] queues = managementService.getResources(QueueControl.class);
+ assertEquals(1, queues.length);
+ assertTrue(queues[0] instanceof QueueControl);
+ QueueControl queueControl = (QueueControl)queues[0];
+ assertEquals(queue.getName().toString(), queueControl.getName());
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/QueueDeployerTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/QueueDeployerTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/unit/core/deployers/impl/QueueDeployerTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -157,6 +157,16 @@
}
+ public String[] getAddressNames()
+ {
+ return null;
+ }
+
+ public String[] getQueueNames()
+ {
+ return null;
+ }
+
List<QueueConfiguration> configs = new ArrayList<QueueConfiguration>();
public void deployQueue(String address, String name, String filter, boolean durable) throws Exception
Modified: trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingImplTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingImplTest.java 2009-09-11 14:22:36 UTC (rev 7955)
+++ trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingImplTest.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -15,11 +15,8 @@
import java.io.InputStream;
import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.Executor;
import javax.transaction.xa.Xid;
@@ -28,11 +25,8 @@
import org.hornetq.core.postoffice.Binding;
import org.hornetq.core.postoffice.BindingType;
import org.hornetq.core.postoffice.impl.BindingsImpl;
-import org.hornetq.core.remoting.Channel;
import org.hornetq.core.remoting.spi.HornetQBuffer;
import org.hornetq.core.server.Bindable;
-import org.hornetq.core.server.Consumer;
-import org.hornetq.core.server.Distributor;
import org.hornetq.core.server.MessageReference;
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.ServerMessage;
@@ -1014,497 +1008,6 @@
}
- class FakeQueue implements Queue
- {
- private SimpleString name;
-
- FakeQueue(SimpleString name)
- {
- this.name = name;
- }
-
- public void setExpiryAddress(SimpleString expiryAddress)
- {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#acknowledge(org.hornetq.core.server.MessageReference)
- */
- public void acknowledge(MessageReference ref) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#acknowledge(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
- */
- public void acknowledge(Transaction tx, MessageReference ref) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#activate()
- */
- public boolean activate()
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#activateNow(java.util.concurrent.Executor)
- */
- public void activateNow(Executor executor)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#addConsumer(org.hornetq.core.server.Consumer)
- */
- public void addConsumer(Consumer consumer) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#addFirst(org.hornetq.core.server.MessageReference)
- */
- public void addFirst(MessageReference ref)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#addLast(org.hornetq.core.server.MessageReference)
- */
- public void addLast(MessageReference ref)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#addRedistributor(long, java.util.concurrent.Executor, org.hornetq.core.remoting.Channel)
- */
- public void addRedistributor(long delay, Executor executor, Channel replicatingChannel)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#cancel(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
- */
- public void cancel(Transaction tx, MessageReference ref) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#cancel(org.hornetq.core.server.MessageReference)
- */
- public void cancel(MessageReference reference) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#cancelRedistributor()
- */
- public void cancelRedistributor() throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#changeReferencePriority(long, byte)
- */
- public boolean changeReferencePriority(long messageID, byte newPriority) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#checkDLQ(org.hornetq.core.server.MessageReference)
- */
- public boolean checkDLQ(MessageReference ref) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#consumerFailedOver()
- */
- public boolean consumerFailedOver()
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#deleteAllReferences()
- */
- public int deleteAllReferences() throws Exception
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#deleteMatchingReferences(org.hornetq.core.filter.Filter)
- */
- public int deleteMatchingReferences(Filter filter) throws Exception
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#deleteReference(long)
- */
- public boolean deleteReference(long messageID) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#deliverAsync(java.util.concurrent.Executor)
- */
- public void deliverAsync(Executor executor)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#deliverNow()
- */
- public void deliverNow()
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#expire(org.hornetq.core.server.MessageReference)
- */
- public void expire(MessageReference ref) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#expireReference(long)
- */
- public boolean expireReference(long messageID) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#expireReferences(org.hornetq.core.filter.Filter)
- */
- public int expireReferences(Filter filter) throws Exception
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#expireReferences()
- */
- public void expireReferences() throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getConsumerCount()
- */
- public int getConsumerCount()
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getConsumers()
- */
- public Set<Consumer> getConsumers()
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getDeliveringCount()
- */
- public int getDeliveringCount()
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getDistributionPolicy()
- */
- public Distributor getDistributionPolicy()
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getFilter()
- */
- public Filter getFilter()
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getMessageCount()
- */
- public int getMessageCount()
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getMessagesAdded()
- */
- public int getMessagesAdded()
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getName()
- */
- public SimpleString getName()
- {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getPersistenceID()
- */
- public long getPersistenceID()
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getReference(long)
- */
- public MessageReference getReference(long id)
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getScheduledCount()
- */
- public int getScheduledCount()
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#getScheduledMessages()
- */
- public List<MessageReference> getScheduledMessages()
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#isBackup()
- */
- public boolean isBackup()
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#isDurable()
- */
- public boolean isDurable()
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#isTemporary()
- */
- public boolean isTemporary()
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#list(org.hornetq.core.filter.Filter)
- */
- public List<MessageReference> list(Filter filter)
- {
-
- return null;
- }
-
- public Iterator<MessageReference> iterator()
- {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#moveReference(long, org.hornetq.utils.SimpleString)
- */
- public boolean moveReference(long messageID, SimpleString toAddress) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#moveReferences(org.hornetq.core.filter.Filter, org.hornetq.utils.SimpleString)
- */
- public int moveReferences(Filter filter, SimpleString toAddress) throws Exception
- {
-
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#reacknowledge(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
- */
- public void reacknowledge(Transaction tx, MessageReference ref) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#referenceHandled()
- */
- public void referenceHandled()
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#removeConsumer(org.hornetq.core.server.Consumer)
- */
- public boolean removeConsumer(Consumer consumer) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#removeFirstReference(long)
- */
- public MessageReference removeFirstReference(long id) throws Exception
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#removeReferenceWithID(long)
- */
- public MessageReference removeReferenceWithID(long id) throws Exception
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#reroute(org.hornetq.core.server.ServerMessage, org.hornetq.core.transaction.Transaction)
- */
- public MessageReference reroute(ServerMessage message, Transaction tx) throws Exception
- {
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#sendMessageToDeadLetterAddress(long)
- */
- public boolean sendMessageToDeadLetterAddress(long messageID) throws Exception
- {
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#setBackup()
- */
- public void setBackup()
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#setDistributionPolicy(org.hornetq.core.server.Distributor)
- */
- public void setDistributionPolicy(Distributor policy)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#setPersistenceID(long)
- */
- public void setPersistenceID(long id)
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Bindable#preroute(org.hornetq.core.server.ServerMessage, org.hornetq.core.transaction.Transaction)
- */
- public void preroute(ServerMessage message, Transaction tx) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Bindable#route(org.hornetq.core.server.ServerMessage, org.hornetq.core.transaction.Transaction)
- */
- public void route(ServerMessage message, Transaction tx) throws Exception
- {
-
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#lock()
- */
- public void lockDelivery()
- {
- }
-
- /* (non-Javadoc)
- * @see org.hornetq.core.server.Queue#unlock()
- */
- public void unlockDelivery()
- {
- }
-
- }
-
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Added: trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java 2009-09-15 09:23:07 UTC (rev 7956)
@@ -0,0 +1,520 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.unit.core.postoffice.impl;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Executor;
+
+import org.hornetq.core.filter.Filter;
+import org.hornetq.core.remoting.Channel;
+import org.hornetq.core.server.Consumer;
+import org.hornetq.core.server.Distributor;
+import org.hornetq.core.server.MessageReference;
+import org.hornetq.core.server.Queue;
+import org.hornetq.core.server.ServerMessage;
+import org.hornetq.core.transaction.Transaction;
+import org.hornetq.utils.SimpleString;
+
+public class FakeQueue implements Queue
+{
+ private SimpleString name;
+
+ public FakeQueue(SimpleString name)
+ {
+ this.name = name;
+ }
+
+ public void setExpiryAddress(SimpleString expiryAddress)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#acknowledge(org.hornetq.core.server.MessageReference)
+ */
+ public void acknowledge(MessageReference ref) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#acknowledge(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
+ */
+ public void acknowledge(Transaction tx, MessageReference ref) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#activate()
+ */
+ public boolean activate()
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#activateNow(java.util.concurrent.Executor)
+ */
+ public void activateNow(Executor executor)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addConsumer(org.hornetq.core.server.Consumer)
+ */
+ public void addConsumer(Consumer consumer) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addFirst(org.hornetq.core.server.MessageReference)
+ */
+ public void addFirst(MessageReference ref)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addLast(org.hornetq.core.server.MessageReference)
+ */
+ public void addLast(MessageReference ref)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#addRedistributor(long, java.util.concurrent.Executor, org.hornetq.core.remoting.Channel)
+ */
+ public void addRedistributor(long delay, Executor executor, Channel replicatingChannel)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#cancel(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
+ */
+ public void cancel(Transaction tx, MessageReference ref) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#cancel(org.hornetq.core.server.MessageReference)
+ */
+ public void cancel(MessageReference reference) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#cancelRedistributor()
+ */
+ public void cancelRedistributor() throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#changeReferencePriority(long, byte)
+ */
+ public boolean changeReferencePriority(long messageID, byte newPriority) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#checkDLQ(org.hornetq.core.server.MessageReference)
+ */
+ public boolean checkDLQ(MessageReference ref) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#consumerFailedOver()
+ */
+ public boolean consumerFailedOver()
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deleteAllReferences()
+ */
+ public int deleteAllReferences() throws Exception
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deleteMatchingReferences(org.hornetq.core.filter.Filter)
+ */
+ public int deleteMatchingReferences(Filter filter) throws Exception
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deleteReference(long)
+ */
+ public boolean deleteReference(long messageID) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deliverAsync(java.util.concurrent.Executor)
+ */
+ public void deliverAsync(Executor executor)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#deliverNow()
+ */
+ public void deliverNow()
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expire(org.hornetq.core.server.MessageReference)
+ */
+ public void expire(MessageReference ref) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expireReference(long)
+ */
+ public boolean expireReference(long messageID) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expireReferences(org.hornetq.core.filter.Filter)
+ */
+ public int expireReferences(Filter filter) throws Exception
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#expireReferences()
+ */
+ public void expireReferences() throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getConsumerCount()
+ */
+ public int getConsumerCount()
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getConsumers()
+ */
+ public Set<Consumer> getConsumers()
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getDeliveringCount()
+ */
+ public int getDeliveringCount()
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getDistributionPolicy()
+ */
+ public Distributor getDistributionPolicy()
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getFilter()
+ */
+ public Filter getFilter()
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getMessageCount()
+ */
+ public int getMessageCount()
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getMessagesAdded()
+ */
+ public int getMessagesAdded()
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getName()
+ */
+ public SimpleString getName()
+ {
+ return name;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getPersistenceID()
+ */
+ public long getPersistenceID()
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getReference(long)
+ */
+ public MessageReference getReference(long id)
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getScheduledCount()
+ */
+ public int getScheduledCount()
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#getScheduledMessages()
+ */
+ public List<MessageReference> getScheduledMessages()
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isBackup()
+ */
+ public boolean isBackup()
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isDurable()
+ */
+ public boolean isDurable()
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#isTemporary()
+ */
+ public boolean isTemporary()
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#list(org.hornetq.core.filter.Filter)
+ */
+ public List<MessageReference> list(Filter filter)
+ {
+
+ return null;
+ }
+
+ public Iterator<MessageReference> iterator()
+ {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#moveReference(long, org.hornetq.utils.SimpleString)
+ */
+ public boolean moveReference(long messageID, SimpleString toAddress) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#moveReferences(org.hornetq.core.filter.Filter, org.hornetq.utils.SimpleString)
+ */
+ public int moveReferences(Filter filter, SimpleString toAddress) throws Exception
+ {
+
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#reacknowledge(org.hornetq.core.transaction.Transaction, org.hornetq.core.server.MessageReference)
+ */
+ public void reacknowledge(Transaction tx, MessageReference ref) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#referenceHandled()
+ */
+ public void referenceHandled()
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#removeConsumer(org.hornetq.core.server.Consumer)
+ */
+ public boolean removeConsumer(Consumer consumer) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#removeFirstReference(long)
+ */
+ public MessageReference removeFirstReference(long id) throws Exception
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#removeReferenceWithID(long)
+ */
+ public MessageReference removeReferenceWithID(long id) throws Exception
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#reroute(org.hornetq.core.server.ServerMessage, org.hornetq.core.transaction.Transaction)
+ */
+ public MessageReference reroute(ServerMessage message, Transaction tx) throws Exception
+ {
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#sendMessageToDeadLetterAddress(long)
+ */
+ public boolean sendMessageToDeadLetterAddress(long messageID) throws Exception
+ {
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#setBackup()
+ */
+ public void setBackup()
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#setDistributionPolicy(org.hornetq.core.server.Distributor)
+ */
+ public void setDistributionPolicy(Distributor policy)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#setPersistenceID(long)
+ */
+ public void setPersistenceID(long id)
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Bindable#preroute(org.hornetq.core.server.ServerMessage, org.hornetq.core.transaction.Transaction)
+ */
+ public void preroute(ServerMessage message, Transaction tx) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Bindable#route(org.hornetq.core.server.ServerMessage, org.hornetq.core.transaction.Transaction)
+ */
+ public void route(ServerMessage message, Transaction tx) throws Exception
+ {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#lock()
+ */
+ public void lockDelivery()
+ {
+ }
+
+ /* (non-Javadoc)
+ * @see org.hornetq.core.server.Queue#unlock()
+ */
+ public void unlockDelivery()
+ {
+ }
+
+}
\ No newline at end of file
More information about the hornetq-commits
mailing list