qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1585471 [1/3] - in /qpid/trunk/qpid/java: bdbstore/jmx/src/main/java/org/apache/qpid/server/store/berkeleydb/jmx/ bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/ bdbstore/src/main/resources/META-INF/services/ bdbstore/src/t...
Date Mon, 07 Apr 2014 12:44:44 GMT
Author: rgodfrey
Date: Mon Apr  7 12:44:42 2014
New Revision: 1585471

URL: http://svn.apache.org/r1585471
Log:
QPID-5665 : [Java Broker] Unify VirtualHost model and implementation classes

Added:
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
      - copied, changed from r1585470, qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostAdapterFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java
      - copied, changed from r1585265, qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostAdapterFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostState.java
      - copied, changed from r1585265, qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/State.java
Removed:
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostAdapter.java
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostAdapterFactory.java
    qpid/trunk/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.VirtualHostFactory
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostAdapter.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostAdapterFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAdapter.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/VirtualHostFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHostFactory.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/State.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostFactoryRegistry.java
    qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.VirtualHostFactory
Modified:
    qpid/trunk/qpid/java/bdbstore/jmx/src/main/java/org/apache/qpid/server/store/berkeleydb/jmx/BDBHAMessageStoreManagerMBeanProvider.java
    qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
    qpid/trunk/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
    qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java
    qpid/trunk/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AMQUnknownExchangeType.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/BindingLogSubject.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/ConnectionAdapter.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAliasAdapter.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ExchangeExistsException.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/QueueExistsException.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/ReservedExchangeNameException.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/UnknownExchangeException.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
    qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/configuration/startup/VirtualHostCreationTest.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/SecurityManagerTest.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/util/BrokerTestHelper.java
    qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhost/MockVirtualHost.java
    qpid/trunk/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
    qpid/trunk/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java
    qpid/trunk/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/ConnectionOpenMethodHandler.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageContentServlet.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagement.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/MBeanInvocationHandlerImpl.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/MBeanUtils.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/QueueMBean.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/VirtualHostMBean.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/mbeans/VirtualHostManagerMBean.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/mbeans/VirtualHostManagerMBeanTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/VirtualHostMessageStoreTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/VirtualHostRestTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/acl/BrokerACLTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java

Modified: qpid/trunk/qpid/java/bdbstore/jmx/src/main/java/org/apache/qpid/server/store/berkeleydb/jmx/BDBHAMessageStoreManagerMBeanProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/jmx/src/main/java/org/apache/qpid/server/store/berkeleydb/jmx/BDBHAMessageStoreManagerMBeanProvider.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/jmx/src/main/java/org/apache/qpid/server/store/berkeleydb/jmx/BDBHAMessageStoreManagerMBeanProvider.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/jmx/src/main/java/org/apache/qpid/server/store/berkeleydb/jmx/BDBHAMessageStoreManagerMBeanProvider.java
Mon Apr  7 12:44:42 2014
@@ -28,7 +28,7 @@ import org.apache.qpid.server.jmx.MBeanP
 import org.apache.qpid.server.jmx.ManagedObject;
 import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHostFactory;
+import org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHost;
 import org.apache.qpid.server.store.berkeleydb.BDBMessageStore;
 import org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade;
 
@@ -49,7 +49,7 @@ public class BDBHAMessageStoreManagerMBe
     @Override
     public boolean isChildManageableByMBean(ConfiguredObject child)
     {
-        return (child instanceof VirtualHost && BDBHAVirtualHostFactory.TYPE.equals(child.getType()));
+        return (child instanceof VirtualHost && BDBHAVirtualHost.TYPE.equals(child.getType()));
     }
 
     @Override

Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
Mon Apr  7 12:44:42 2014
@@ -23,12 +23,16 @@ package org.apache.qpid.server.store.ber
 import java.util.HashMap;
 import java.util.Map;
 
+import com.sleepycat.je.rep.StateChangeEvent;
+import com.sleepycat.je.rep.StateChangeListener;
 import org.apache.log4j.Logger;
+
 import org.apache.qpid.server.connection.IConnectionRegistry;
 import org.apache.qpid.server.logging.messages.MessageStoreMessages;
 import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject;
+import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.ManagedObject;
 import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.stats.StatisticsGatherer;
 import org.apache.qpid.server.store.ConfiguredObjectRecordRecoveverAndUpgrader;
 import org.apache.qpid.server.store.DurableConfigurationStore;
 import org.apache.qpid.server.store.MessageStore;
@@ -37,30 +41,55 @@ import org.apache.qpid.server.store.berk
 import org.apache.qpid.server.store.handler.ConfiguredObjectRecordHandler;
 import org.apache.qpid.server.virtualhost.AbstractVirtualHost;
 import org.apache.qpid.server.virtualhost.MessageStoreRecoverer;
-import org.apache.qpid.server.virtualhost.State;
-import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
-
-import com.sleepycat.je.rep.StateChangeEvent;
-import com.sleepycat.je.rep.StateChangeListener;
+import org.apache.qpid.server.virtualhost.VirtualHostState;
 
-public class BDBHAVirtualHost extends AbstractVirtualHost
+@ManagedObject( category = false, type = "BDB_HA" )
+public class BDBHAVirtualHost extends AbstractVirtualHost<BDBHAVirtualHost>
 {
+    public static final String TYPE = "BDB_HA";
     private static final Logger LOGGER = Logger.getLogger(BDBHAVirtualHost.class);
 
     private BDBMessageStore _messageStore;
     private MessageStoreLogSubject _messageStoreLogSubject;
 
-    BDBHAVirtualHost(VirtualHostRegistry virtualHostRegistry,
-                     StatisticsGatherer brokerStatisticsGatherer,
-                     org.apache.qpid.server.security.SecurityManager parentSecurityManager,
-                     VirtualHost virtualHost)
+    BDBHAVirtualHost(final Map<String, Object> attributes, Broker<?> broker)
     {
-        super(virtualHostRegistry, brokerStatisticsGatherer, parentSecurityManager, virtualHost);
+        super(attributes, broker);
+    }
+
+
+    @Override
+    protected void validateAttributes()
+    {
+        super.validateAttributes();
+        Map<String, Object> attributes = getActualAttributes();
+        @SuppressWarnings("unchecked")
+        Map<String, Object> messageStoreSettings = (Map<String, Object>)attributes.get(org.apache.qpid.server.model.VirtualHost.MESSAGE_STORE_SETTINGS);
+        if (messageStoreSettings == null)
+        {
+            throw new IllegalArgumentException("Attribute '"+ org.apache.qpid.server.model.VirtualHost.MESSAGE_STORE_SETTINGS
+ "' is required.");
+        }
+
+        validateAttribute(MessageStore.STORE_PATH, String.class, messageStoreSettings);
+        validateAttribute(ReplicatedEnvironmentFacadeFactory.GROUP_NAME, String.class, messageStoreSettings);
+        validateAttribute(ReplicatedEnvironmentFacadeFactory.NODE_NAME, String.class, messageStoreSettings);
+        validateAttribute(ReplicatedEnvironmentFacadeFactory.NODE_ADDRESS, String.class,
messageStoreSettings);
+        validateAttribute(ReplicatedEnvironmentFacadeFactory.HELPER_ADDRESS, String.class,
messageStoreSettings);
+    }
+
+    private void validateAttribute(String attrName, Class<?> clazz, Map<String,
Object> attributes)
+    {
+        Object attr = attributes.get(attrName);
+        if(!clazz.isInstance(attr))
+        {
+            throw new IllegalArgumentException("Attribute '"+ attrName
+                                               +"' is required and must be of type "+clazz.getSimpleName()+".");
+        }
     }
 
     protected void initialiseStorage(VirtualHost virtualHost)
     {
-        setState(State.PASSIVE);
+        setState(VirtualHostState.PASSIVE);
 
         _messageStoreLogSubject = new MessageStoreLogSubject(getName(), BDBMessageStore.class.getSimpleName());
         _messageStore = new BDBMessageStore(new ReplicatedEnvironmentFacadeFactory());
@@ -92,7 +121,7 @@ public class BDBHAVirtualHost extends Ab
         return _messageStore;
     }
 
-    private void activate()
+    private void onMaster()
     {
         try
         {
@@ -115,7 +144,7 @@ public class BDBHAVirtualHost extends Ab
 
     private void passivate()
     {
-        State finalState = State.ERRORED;
+        VirtualHostState finalState = VirtualHostState.ERRORED;
 
         try
         {
@@ -132,12 +161,12 @@ public class BDBHAVirtualHost extends Ab
             getExchangeRegistry().clearAndUnregisterMbeans();
             getDtxRegistry().close();
 
-            finalState = State.PASSIVE;
+            finalState = VirtualHostState.PASSIVE;
         }
         finally
         {
             setState(finalState);
-            reportIfError(getState());
+            reportIfError(getVirtualHostState());
         }
     }
 
@@ -163,7 +192,7 @@ public class BDBHAVirtualHost extends Ab
             switch (state)
             {
             case MASTER:
-                activate();
+                onMaster();
                 break;
             case REPLICA:
                 passivate();

Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
(from r1585470, qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostAdapterFactory.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java&p1=qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostAdapterFactory.java&r1=1585470&r2=1585471&rev=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostAdapterFactory.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
Mon Apr  7 12:44:42 2014
@@ -28,23 +28,20 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
 
-public class BDBHAVirtualHostAdapterFactory extends AbstractConfiguredObjectTypeFactory<BDBHAVirtualHostAdapter>
+public class BDBHAVirtualHostFactory extends AbstractConfiguredObjectTypeFactory<BDBHAVirtualHost>
 {
 
-    public BDBHAVirtualHostAdapterFactory()
+    public BDBHAVirtualHostFactory()
     {
-        super(BDBHAVirtualHostAdapter.class);
+        super(BDBHAVirtualHost.class);
     }
 
     @Override
-    public BDBHAVirtualHostAdapter createInstance(final Map<String, Object> attributes,
+    public BDBHAVirtualHost createInstance(final Map<String, Object> attributes,
                                                  final ConfiguredObject<?>... parents)
     {
-        Map<String,Object> attributesWithoutId = new HashMap<String, Object>(attributes);
-        Object idObj = attributesWithoutId.remove(ConfiguredObject.ID);
-        UUID id = idObj == null ? UUID.randomUUID() : idObj instanceof UUID ? (UUID) idObj
: UUID.fromString(idObj.toString());
         final Broker broker = getParent(Broker.class, parents);
-        return new BDBHAVirtualHostAdapter(id, attributesWithoutId, broker);
+        return new BDBHAVirtualHost(attributes, broker);
     }
 
 

Modified: qpid/trunk/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
(original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
Mon Apr  7 12:44:42 2014
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHostAdapterFactory
+org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHostFactory

Modified: qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/VirtualHostTest.java
Mon Apr  7 12:44:42 2014
@@ -20,8 +20,18 @@
  */
 package org.apache.qpid.server.store.berkeleydb;
 
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
 import com.sleepycat.je.rep.ReplicatedEnvironment;
 import com.sleepycat.je.rep.ReplicationConfig;
+
 import org.apache.qpid.server.configuration.ConfigurationEntryStore;
 import org.apache.qpid.server.configuration.RecovererProvider;
 import org.apache.qpid.server.configuration.updater.TaskExecutor;
@@ -38,15 +48,6 @@ import org.apache.qpid.server.util.Broke
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.util.FileUtils;
 
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
 public class VirtualHostTest extends QpidTestCase
 {
 
@@ -54,7 +55,7 @@ public class VirtualHostTest extends Qpi
     private StatisticsGatherer _statisticsGatherer;
     private RecovererProvider _recovererProvider;
     private File _bdbStorePath;
-    private VirtualHost<?> _host;
+    private VirtualHost<?,?,?> _host;
     private ConfigurationEntryStore _store;
 
     @Override
@@ -117,14 +118,14 @@ public class VirtualHostTest extends Qpi
 
         Map<String, Object> virtualHostAttributes = new HashMap<String, Object>();
         virtualHostAttributes.put(VirtualHost.NAME, virtualHostName);
-        virtualHostAttributes.put(VirtualHost.TYPE, BDBHAVirtualHostFactory.TYPE);
+        virtualHostAttributes.put(VirtualHost.TYPE, BDBHAVirtualHost.TYPE);
         virtualHostAttributes.put(VirtualHost.MESSAGE_STORE_SETTINGS, messageStoreSettings);
 
         _host = createHost(virtualHostAttributes);
         _host.setDesiredState(State.INITIALISING, State.ACTIVE);
 
         assertEquals("Unexpected virtual host name", virtualHostName, _host.getName());
-        assertEquals("Unexpected host type", BDBHAVirtualHostFactory.TYPE, _host.getType());
+        assertEquals("Unexpected host type", BDBHAVirtualHost.TYPE, _host.getType());
 
         assertEquals(messageStoreSettings, _host.getMessageStoreSettings());
 
@@ -141,14 +142,14 @@ public class VirtualHostTest extends Qpi
     }
 
 
-    private VirtualHost<?> createHost(Map<String, Object> attributes)
+    private VirtualHost<?,?,?> createHost(Map<String, Object> attributes)
     {
         ConfiguredObjectFactory factory = new ConfiguredObjectFactory();
         ConfiguredObjectTypeFactory vhostFactory =
                 factory.getConfiguredObjectTypeFactory(VirtualHost.class, attributes);
         attributes = new HashMap<String, Object>(attributes);
         attributes.put(ConfiguredObject.ID, UUID.randomUUID());
-        return (VirtualHost<?>) vhostFactory.create(attributes,_broker);
+        return (VirtualHost<?,?,?>) vhostFactory.create(attributes,_broker);
     }
 
 }

Modified: qpid/trunk/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java
(original)
+++ qpid/trunk/qpid/java/bdbstore/systests/src/main/java/org/apache/qpid/server/store/berkeleydb/HATestClusterCreator.java
Mon Apr  7 12:44:42 2014
@@ -117,7 +117,7 @@ public class HATestClusterCreator
 
             TestBrokerConfiguration brokerConfiguration = _testcase.getBrokerConfiguration(brokerPort);
             brokerConfiguration.addJmxManagementConfiguration();
-            brokerConfiguration.setObjectAttribute(VirtualHost.class, _virtualHostName, VirtualHost.TYPE,
BDBHAVirtualHostFactory.TYPE);
+            brokerConfiguration.setObjectAttribute(VirtualHost.class, _virtualHostName, VirtualHost.TYPE,
BDBHAVirtualHost.TYPE);
             brokerConfiguration.setObjectAttribute(VirtualHost.class, _virtualHostName, VirtualHost.MESSAGE_STORE_SETTINGS,
messageStoreSettings);
 
             brokerPort = _testcase.getNextAvailable(bdbPort + 1);

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AMQUnknownExchangeType.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AMQUnknownExchangeType.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AMQUnknownExchangeType.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/AMQUnknownExchangeType.java
Mon Apr  7 12:44:42 2014
@@ -32,7 +32,7 @@ package org.apache.qpid.server.exchange;
  * @todo Represent coding error, where unknown exchange type is requested by passing a string
parameter. Use a type safe
  *       enum for the exchange type, or replace with IllegalArgumentException. Should be
runtime.
  */
-public class AMQUnknownExchangeType extends Exception
+public class AMQUnknownExchangeType extends RuntimeException
 {
     public AMQUnknownExchangeType(String message, Throwable cause)
     {

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/BindingLogSubject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/BindingLogSubject.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/BindingLogSubject.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/logging/subjects/BindingLogSubject.java
Mon Apr  7 12:44:42 2014
@@ -20,10 +20,12 @@
  */
 package org.apache.qpid.server.logging.subjects;
 
+import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.BINDING_FORMAT;
+
 import org.apache.qpid.server.exchange.ExchangeImpl;
+import org.apache.qpid.server.plugin.ExchangeType;
 import org.apache.qpid.server.queue.AMQQueue;
-
-import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.BINDING_FORMAT;
+import org.apache.qpid.server.virtualhost.VirtualHost;
 
 public class BindingLogSubject extends AbstractLogSubject
 {
@@ -40,9 +42,11 @@ public class BindingLogSubject extends A
     public BindingLogSubject(String routingKey, ExchangeImpl exchange,
                              AMQQueue queue)
     {
+        VirtualHost virtualHost = queue.getVirtualHost();
+        ExchangeType exchangeType = exchange.getExchangeType();
         setLogStringWithFormat(BINDING_FORMAT,
-                               queue.getVirtualHost().getName(),
-                               exchange.getExchangeType().getType(),
+                               virtualHost.getName(),
+                               exchangeType.getType(),
                                exchange.getName(),
                                queue.getName(),
                                routingKey);

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
Mon Apr  7 12:44:42 2014
@@ -20,6 +20,9 @@
  */
 package org.apache.qpid.server.model;
 
+import java.net.SocketAddress;
+import java.util.Collection;
+
 import org.apache.qpid.server.configuration.updater.TaskExecutor;
 import org.apache.qpid.server.logging.EventLogger;
 import org.apache.qpid.server.logging.EventLoggerProvider;
@@ -29,9 +32,6 @@ import org.apache.qpid.server.security.S
 import org.apache.qpid.server.stats.StatisticsGatherer;
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 
-import java.net.SocketAddress;
-import java.util.Collection;
-
 @ManagedObject( defaultType = "adapter" )
 public interface Broker<X extends Broker<X>> extends ConfiguredObject<X>,
EventLoggerProvider, StatisticsGatherer
 {
@@ -178,7 +178,7 @@ public interface Broker<X extends Broker
 
 
     //children
-    Collection < VirtualHost<?> > getVirtualHosts();
+    Collection < VirtualHost<?,?,?> > getVirtualHosts();
 
     Collection<Port<?>> getPorts();
 
@@ -201,7 +201,7 @@ public interface Broker<X extends Broker
 
     AuthenticationProvider<?> findAuthenticationProviderByName(String authenticationProviderName);
 
-    VirtualHost<?> findVirtualHostByName(String name);
+    VirtualHost<?,?,?> findVirtualHostByName(String name);
 
     KeyStore<?> findKeyStoreByName(String name);
 

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java
Mon Apr  7 12:44:42 2014
@@ -20,17 +20,17 @@
  */
 package org.apache.qpid.server.model;
 
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
-import org.apache.qpid.server.message.MessageInstance;
-import org.apache.qpid.server.store.MessageStore;
-
 import java.security.AccessControlException;
 import java.util.Collection;
 import java.util.Map;
 import java.util.UUID;
 
+import org.apache.qpid.server.configuration.updater.TaskExecutor;
+import org.apache.qpid.server.message.MessageInstance;
+import org.apache.qpid.server.store.MessageStore;
+
 @ManagedObject( managesChildren = true, defaultType = "STANDARD")
-public interface VirtualHost<X extends VirtualHost<X>> extends ConfiguredObject<X>
+public interface VirtualHost<X extends VirtualHost<X, Q, E>, Q extends Queue<?>,
E extends Exchange<?> > extends ConfiguredObject<X>
 {
 
     String QUEUE_ALERT_REPEAT_GAP                     = "queue.alertRepeatGap";
@@ -144,17 +144,17 @@ public interface VirtualHost<X extends V
     //children
     Collection<VirtualHostAlias> getAliases();
     Collection<Connection> getConnections();
-    Collection<Queue> getQueues();
-    Collection<Exchange> getExchanges();
+    Collection<Q> getQueues();
+    Collection<E> getExchanges();
 
-    Exchange createExchange(String name, State initialState, boolean durable,
+    E createExchange(String name, State initialState, boolean durable,
                             LifetimePolicy lifetime, String type, Map<String, Object>
attributes)
             throws AccessControlException, IllegalArgumentException;
 
-    Queue createQueue(Map<String, Object> attributes)
+    Q createQueue(Map<String, Object> attributes)
             throws AccessControlException, IllegalArgumentException;
 
-    Collection<String> getExchangeTypes();
+    Collection<String> getExchangeTypeNames();
 
     public static interface Transaction
     {
@@ -176,7 +176,7 @@ public interface VirtualHost<X extends V
     // TODO - remove this
     TaskExecutor getTaskExecutor();
 
-    Exchange getExchange(UUID id);
+    E getExchange(UUID id);
 
     MessageStore getMessageStore();
 

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
Mon Apr  7 12:44:42 2014
@@ -20,7 +20,25 @@
  */
 package org.apache.qpid.server.model.adapter;
 
+import java.lang.reflect.Type;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.security.AccessControlException;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.UUID;
+import java.util.regex.Pattern;
+
+import javax.security.auth.Subject;
+
 import org.apache.log4j.Logger;
+
 import org.apache.qpid.common.QpidProperties;
 import org.apache.qpid.server.BrokerOptions;
 import org.apache.qpid.server.configuration.IllegalConfigurationException;
@@ -34,7 +52,6 @@ import org.apache.qpid.server.model.port
 import org.apache.qpid.server.model.port.PortWithAuthProvider;
 import org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory;
 import org.apache.qpid.server.plugin.MessageStoreFactory;
-import org.apache.qpid.server.plugin.VirtualHostFactory;
 import org.apache.qpid.server.security.FileKeyStore;
 import org.apache.qpid.server.security.FileTrustStore;
 import org.apache.qpid.server.security.SecurityManager;
@@ -47,15 +64,6 @@ import org.apache.qpid.server.util.MapVa
 import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
 import org.apache.qpid.util.SystemUtils;
 
-import javax.security.auth.Subject;
-import java.lang.reflect.Type;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.security.AccessControlException;
-import java.security.PrivilegedAction;
-import java.util.*;
-import java.util.regex.Pattern;
-
 @ManagedObject(category = false, type = "adapter")
 public class BrokerAdapter extends AbstractConfiguredObject<BrokerAdapter> implements
Broker<BrokerAdapter>, ConfigurationChangeListener, StatisticsGatherer, StatisticsGatherer.Source
 {
@@ -152,7 +160,7 @@ public class BrokerAdapter extends Abstr
     private final VirtualHostRegistry _virtualHostRegistry;
     private final LogRecorder _logRecorder;
 
-    private final Map<String, VirtualHost<?>> _vhostAdapters = new HashMap<String,
VirtualHost<?>>();
+    private final Map<String, VirtualHost<?,?,?>> _vhostAdapters = new HashMap<String,
VirtualHost<?,?,?>>();
     private final Map<UUID, Port<?>> _portAdapters = new HashMap<UUID, Port<?>>();
     private final Map<Port, Integer> _stillInUsePortNumbers = new HashMap<Port,
Integer>();
     private final Map<UUID, AuthenticationProvider<?>> _authenticationProviders
= new HashMap<UUID, AuthenticationProvider<?>>();
@@ -418,11 +426,11 @@ public class BrokerAdapter extends Abstr
         return (Long) getAttribute(VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_WARN);
     }
 
-    public Collection<VirtualHost<?>> getVirtualHosts()
+    public Collection<VirtualHost<?,?,?>> getVirtualHosts()
     {
         synchronized(_vhostAdapters)
         {
-            return new ArrayList<VirtualHost<?>>(_vhostAdapters.values());
+            return new ArrayList<VirtualHost<?,?,?>>(_vhostAdapters.values());
         }
     }
 
@@ -489,7 +497,7 @@ public class BrokerAdapter extends Abstr
     {
         ConfiguredObjectTypeFactory virtualHostFactory =
                 _objectFactory.getConfiguredObjectTypeFactory(VirtualHost.class, attributes);
-        final VirtualHostAdapter virtualHostAdapter = (VirtualHostAdapter) virtualHostFactory.create(attributes,this);
+        final VirtualHost virtualHost = (VirtualHost) virtualHostFactory.create(attributes,this);
 
         // permission has already been granted to create the virtual host
         // disable further access check on other operations, e.g. create exchange
@@ -498,11 +506,11 @@ public class BrokerAdapter extends Abstr
                                 @Override
                                 public Object run()
                                 {
-                                    virtualHostAdapter.setDesiredState(State.INITIALISING,
State.ACTIVE);
+                                    virtualHost.setDesiredState(State.INITIALISING, State.ACTIVE);
                                     return null;
                                 }
                             });
-        return virtualHostAdapter;
+        return virtualHost;
     }
 
     private boolean deleteVirtualHost(final VirtualHost vhost) throws AccessControlException,
IllegalStateException
@@ -972,7 +980,7 @@ public class BrokerAdapter extends Abstr
         }
         else if(SUPPORTED_VIRTUALHOST_TYPES.equals(name))
         {
-            return VirtualHostFactory.TYPES.get();
+            return _objectFactory.getSupportedTypes(VirtualHost.class);
         }
         else if(SUPPORTED_AUTHENTICATION_PROVIDERS.equals(name))
         {
@@ -1028,7 +1036,7 @@ public class BrokerAdapter extends Abstr
         return removedAuthenticationProvider != null;
     }
 
-    private void addVirtualHost(VirtualHost<?> virtualHost)
+    private void addVirtualHost(VirtualHost<?,?,?> virtualHost)
     {
         synchronized (_vhostAdapters)
         {

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/ConnectionAdapter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/ConnectionAdapter.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/ConnectionAdapter.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/ConnectionAdapter.java
Mon Apr  7 12:44:42 2014
@@ -31,7 +31,7 @@ import org.apache.qpid.server.protocol.A
 import org.apache.qpid.server.protocol.AMQSessionModel;
 import org.apache.qpid.server.protocol.SessionModelListener;
 
-final class ConnectionAdapter extends AbstractConfiguredObject<ConnectionAdapter> implements
Connection<ConnectionAdapter>,
+public final class ConnectionAdapter extends AbstractConfiguredObject<ConnectionAdapter>
implements Connection<ConnectionAdapter>,
                                                                                         
    SessionModelListener
 {
     private AMQConnectionModel _connection;

Copied: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java
(from r1585265, qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostAdapterFactory.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java?p2=qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java&p1=qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostAdapterFactory.java&r1=1585265&r2=1585471&rev=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostAdapterFactory.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java
Mon Apr  7 12:44:42 2014
@@ -20,31 +20,27 @@
  */
 package org.apache.qpid.server.model.adapter;
 
+import java.util.Map;
+
 import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.ConfiguredObject;
+import org.apache.qpid.server.virtualhost.StandardVirtualHost;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-public class StandardVirtualHostAdapterFactory extends AbstractConfiguredObjectTypeFactory<StandardVirtualHostAdapter>
+public class StandardVirtualHostFactory extends AbstractConfiguredObjectTypeFactory<StandardVirtualHost>
 {
 
-    public StandardVirtualHostAdapterFactory()
+    public StandardVirtualHostFactory()
     {
-        super(StandardVirtualHostAdapter.class);
+        super(StandardVirtualHost.class);
     }
 
     @Override
-    public StandardVirtualHostAdapter createInstance(final Map<String, Object> attributes,
+    public StandardVirtualHost createInstance(final Map<String, Object> attributes,
                                                  final ConfiguredObject<?>... parents)
     {
-        Map<String,Object> attributesWithoutId = new HashMap<String, Object>(attributes);
-        Object idObj = attributesWithoutId.remove(ConfiguredObject.ID);
-        UUID id = idObj == null ? UUID.randomUUID() : idObj instanceof UUID ? (UUID) idObj
: UUID.fromString(idObj.toString());
         final Broker broker = getParent(Broker.class, parents);
-        return new StandardVirtualHostAdapter(id, attributesWithoutId, broker);
+        return new StandardVirtualHost(attributes, broker);
     }
 
 

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAliasAdapter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAliasAdapter.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAliasAdapter.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/VirtualHostAliasAdapter.java
Mon Apr  7 12:44:42 2014
@@ -21,32 +21,41 @@
 
 package org.apache.qpid.server.model.adapter;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.qpid.server.model.*;
-
 import java.security.AccessControlException;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.qpid.server.model.AbstractConfiguredObject;
+import org.apache.qpid.server.model.AuthenticationMethod;
+import org.apache.qpid.server.model.ConfiguredObject;
+import org.apache.qpid.server.model.LifetimePolicy;
+import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.State;
+import org.apache.qpid.server.model.UUIDGenerator;
+import org.apache.qpid.server.model.VirtualHost;
+import org.apache.qpid.server.model.VirtualHostAlias;
 
 public class VirtualHostAliasAdapter extends AbstractConfiguredObject<VirtualHostAliasAdapter>
implements VirtualHostAlias<VirtualHostAliasAdapter>
 {
-    private VirtualHostAdapter _vhost;
+    private VirtualHost _vhost;
     private Port _port;
 
-    public VirtualHostAliasAdapter(VirtualHostAdapter virtualHostAdapter, Port port)
+    public VirtualHostAliasAdapter(VirtualHost virtualHost, Port port)
     {
-        super(Collections.<String,Object>emptyMap(), createAttributes(virtualHostAdapter,
port), virtualHostAdapter.getTaskExecutor());
-        _vhost = virtualHostAdapter;
+        super(Collections.<String, Object>emptyMap(),
+              createAttributes(virtualHost, port),
+              virtualHost.getTaskExecutor());
+        _vhost = virtualHost;
         _port = port;
     }
 
-    private static Map<String, Object> createAttributes(final VirtualHostAdapter virtualHostAdapter,
final Port port)
+    private static Map<String, Object> createAttributes(final VirtualHost virtualHost,
final Port port)
     {
         final Map<String, Object> attributes = new HashMap<String, Object>();
-        attributes.put(ID, UUIDGenerator.generateVhostAliasUUID(virtualHostAdapter.getName(),
port.getName()));
-        attributes.put(NAME, virtualHostAdapter.getName());
+        attributes.put(ID, UUIDGenerator.generateVhostAliasUUID(virtualHost.getName(), port.getName()));
+        attributes.put(NAME, virtualHost.getName());
         return attributes;
     }
 

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
Mon Apr  7 12:44:42 2014
@@ -181,7 +181,7 @@ abstract public class AbstractPort<X ext
     public Collection<VirtualHostAlias> getVirtualHostBindings()
     {
         List<VirtualHostAlias> aliases = new ArrayList<VirtualHostAlias>();
-        for(VirtualHost<?> vh : _broker.getVirtualHosts())
+        for(VirtualHost<?,?,?> vh : _broker.getVirtualHosts())
         {
             for(VirtualHostAlias<?> alias : vh.getAliases())
             {

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/DefaultQueueRegistry.java
Mon Apr  7 12:44:42 2014
@@ -20,17 +20,17 @@
  */
 package org.apache.qpid.server.queue;
 
-import org.apache.qpid.server.virtualhost.VirtualHost;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
+import org.apache.qpid.server.virtualhost.VirtualHost;
+
 public class DefaultQueueRegistry implements QueueRegistry
 {
-    private ConcurrentMap<String, AMQQueue> _queueMap = new ConcurrentHashMap<String,
AMQQueue>();
+    private ConcurrentMap<String, AMQQueue<?>> _queueMap = new ConcurrentHashMap<String,
AMQQueue<?>>();
 
     private final VirtualHost _virtualHost;
     private final Collection<RegistryChangeListener> _listeners =
@@ -74,7 +74,7 @@ public class DefaultQueueRegistry implem
     }
 
 
-    public Collection<AMQQueue> getQueues()
+    public Collection<AMQQueue<?>> getQueues()
     {
         return _queueMap.values();
     }
@@ -116,8 +116,8 @@ public class DefaultQueueRegistry implem
     @Override
     public synchronized AMQQueue getQueue(UUID queueId)
     {
-        Collection<AMQQueue> queues = _queueMap.values();
-        for (AMQQueue queue : queues)
+        Collection<AMQQueue<?>> queues = _queueMap.values();
+        for (AMQQueue<?> queue : queues)
         {
             if (queue.getId().equals(queueId))
             {

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java?rev=1585471&r1=1585470&r2=1585471&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueRegistry.java
Mon Apr  7 12:44:42 2014
@@ -20,28 +20,28 @@
  */
 package org.apache.qpid.server.queue;
 
-import org.apache.qpid.server.virtualhost.VirtualHost;
-
 import java.util.Collection;
 import java.util.UUID;
 
+import org.apache.qpid.server.virtualhost.VirtualHost;
+
 public interface QueueRegistry
 {
     VirtualHost getVirtualHost();
 
-    void registerQueue(AMQQueue queue);
+    void registerQueue(AMQQueue<?> queue);
 
     void unregisterQueue(String name);
 
-    Collection<AMQQueue> getQueues();
+    Collection<AMQQueue<?>> getQueues();
 
-    AMQQueue getQueue(String queue);
+    AMQQueue<?> getQueue(String queue);
 
     void addRegistryChangeListener(RegistryChangeListener listener);
 
     void stopAllAndUnregisterMBeans();
 
-    AMQQueue getQueue(UUID queueId);
+    AMQQueue<?> getQueue(UUID queueId);
 
     interface RegistryChangeListener
     {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message