diff options
| author | Alex Rudyy <orudyy@apache.org> | 2013-04-19 15:50:48 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2013-04-19 15:50:48 +0000 |
| commit | 03222bbf6ff76ce66d3ab8a07f3edf46fae05ad5 (patch) | |
| tree | 155bb580754a89fb5895864be8a9ea6203aef9bc /java/broker | |
| parent | a00e98098a537183289444df61ab1dadce4f7b92 (diff) | |
| download | qpid-python-03222bbf6ff76ce66d3ab8a07f3edf46fae05ad5.tar.gz | |
QPID-4755: Rename broker attribute 'supportedStoreTypes' into 'virtualHostSupportedStoreTypes' and introduce new attribute for broker supported store types
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1469917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker')
3 files changed, 21 insertions, 6 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerConfigurationStoreCreator.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerConfigurationStoreCreator.java index a91c3695b3..8ce74ff334 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerConfigurationStoreCreator.java +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerConfigurationStoreCreator.java @@ -20,6 +20,8 @@ */ package org.apache.qpid.server.configuration; +import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -72,4 +74,8 @@ public class BrokerConfigurationStoreCreator return factory.createStore(storeLocation, initialStore, overwrite); } + public Collection<String> getStoreTypes() + { + return Collections.unmodifiableCollection(_factories.keySet()); + } } diff --git a/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java b/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java index 44adf3414d..2cdc62d2dc 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java +++ b/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java @@ -43,7 +43,8 @@ public interface Broker extends ConfiguredObject String PLATFORM = "platform"; String PROCESS_PID = "processPid"; String PRODUCT_VERSION = "productVersion"; - String SUPPORTED_STORE_TYPES = "supportedStoreTypes"; + String SUPPORTED_BROKER_STORE_TYPES = "supportedBrokerStoreTypes"; + String SUPPORTED_VIRTUALHOST_STORE_TYPES = "supportedVirtualHostStoreTypes"; String SUPPORTED_AUTHENTICATION_PROVIDERS = "supportedAuthenticationProviders"; String CREATED = "created"; String DURABLE = "durable"; @@ -95,7 +96,8 @@ public interface Broker extends ConfiguredObject PLATFORM, PROCESS_PID, PRODUCT_VERSION, - SUPPORTED_STORE_TYPES, + SUPPORTED_BROKER_STORE_TYPES, + SUPPORTED_VIRTUALHOST_STORE_TYPES, SUPPORTED_AUTHENTICATION_PROVIDERS, CREATED, DURABLE, diff --git a/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java b/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java index 17a8f19cd3..b0e57d339a 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java +++ b/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java @@ -34,6 +34,7 @@ import java.util.UUID; import org.apache.log4j.Logger; import org.apache.qpid.common.QpidProperties; import org.apache.qpid.server.BrokerOptions; +import org.apache.qpid.server.configuration.BrokerConfigurationStoreCreator; import org.apache.qpid.server.configuration.ConfigurationEntryStore; import org.apache.qpid.server.configuration.IllegalConfigurationException; import org.apache.qpid.server.configuration.updater.TaskExecutor; @@ -172,7 +173,8 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat private final PortFactory _portFactory; private final SecurityManager _securityManager; - private final Collection<String> _supportedStoreTypes; + private final Collection<String> _supportedVirtualHostStoreTypes; + private Collection<String> _supportedBrokerStoreTypes; private final ConfigurationEntryStore _brokerStore; private AuthenticationProvider _managementAuthenticationProvider; @@ -194,7 +196,8 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat _portFactory = portFactory; _securityManager = new SecurityManager((String)getAttribute(ACL_FILE)); addChangeListener(_securityManager); - _supportedStoreTypes = new MessageStoreCreator().getStoreTypes(); + _supportedVirtualHostStoreTypes = new MessageStoreCreator().getStoreTypes(); + _supportedBrokerStoreTypes = new BrokerConfigurationStoreCreator().getStoreTypes(); _brokerStore = brokerStore; _brokerOptions = brokerOptions; if (_brokerOptions.isManagementMode()) @@ -684,9 +687,13 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat { return QpidProperties.getReleaseVersion(); } - else if(SUPPORTED_STORE_TYPES.equals(name)) + else if(SUPPORTED_BROKER_STORE_TYPES.equals(name)) { - return _supportedStoreTypes; + return _supportedBrokerStoreTypes; + } + else if(SUPPORTED_VIRTUALHOST_STORE_TYPES.equals(name)) + { + return _supportedVirtualHostStoreTypes; } else if(SUPPORTED_AUTHENTICATION_PROVIDERS.equals(name)) { |
