summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins/simple-xml/src
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2010-06-02 16:47:34 +0000
committerMartin Ritchie <ritchiem@apache.org>2010-06-02 16:47:34 +0000
commit45256699f28ea572791cb0b3062dba6c5dedbf39 (patch)
treea708a7bef04cd0402be05edf010ab582d2c77e84 /qpid/java/broker-plugins/simple-xml/src
parent586e837012f70ab3dd0aaccb221548e799040663 (diff)
downloadqpid-python-45256699f28ea572791cb0b3062dba6c5dedbf39.tar.gz
QPID-2581 : Update Plugins to have a consistent configure(ConfigurationPlugin config) method.
Further work is required to ensure that all ConfigurationPlugins perform config validation rather than leaving that to the plugin. The plugin should just use the config. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@950656 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/simple-xml/src')
-rw-r--r--qpid/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/qpid/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java b/qpid/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
index 4b3d8f02de..26a5c132f9 100644
--- a/qpid/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
+++ b/qpid/java/broker-plugins/simple-xml/src/main/java/org/apache/qpid/server/security/access/plugins/SimpleXML.java
@@ -52,8 +52,8 @@ public class SimpleXML extends AbstractPlugin
{
public SimpleXML newInstance(ConfigurationPlugin config) throws ConfigurationException
{
- SimpleXML plugin = new SimpleXML(config);
- plugin.configure();
+ SimpleXML plugin = new SimpleXML();
+ plugin.configure(config);
return plugin;
}
@@ -68,20 +68,17 @@ public class SimpleXML extends AbstractPlugin
}
};
- public SimpleXML(ConfigurationPlugin config) throws ConfigurationException
+ public void configure(ConfigurationPlugin config) throws ConfigurationException
{
_config = config.getConfiguration(SimpleXMLConfiguration.class);
- }
- public void configure() throws ConfigurationException
- {
- SimpleXMLConfiguration config = (SimpleXMLConfiguration) _config;
+ SimpleXMLConfiguration configuration = (SimpleXMLConfiguration) _config;
if (isConfigured())
{
_users = new ConcurrentHashMap<String, PrincipalPermissions>();
- processConfig(config.getConfiguration());
+ processConfig(configuration.getConfiguration());
}
}