From fa03f90c445acbfe1a9456a0ef5a4c00375dc7ee Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Fri, 7 May 2010 15:14:24 +0000 Subject: QPID-2579 : Remove debug logging git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@942116 13f79535-47bb-0310-9956-ffa450edef68 --- .../server/configuration/ConfigurationManager.java | 4 +- .../server/configuration/QueueConfiguration.java | 2 +- .../server/configuration/ServerConfiguration.java | 4 +- .../configuration/VirtualHostConfiguration.java | 3 +- .../configuration/plugin/ConfigurationPlugin.java | 147 --------------------- .../plugin/ConfigurationPluginFactory.java | 41 ------ .../configuration/plugins/ConfigurationPlugin.java | 147 +++++++++++++++++++++ .../plugins/ConfigurationPluginFactory.java | 41 ++++++ .../apache/qpid/server/plugins/PluginManager.java | 8 +- .../qpid/server/registry/ApplicationRegistry.java | 9 +- .../qpid/server/virtualhost/VirtualHostImpl.java | 4 +- .../virtualhost/plugin/VirtualHostPlugin.java | 40 ------ .../plugin/VirtualHostPluginFactory.java | 28 ---- .../virtualhost/plugins/VirtualHostPlugin.java | 40 ++++++ .../plugins/VirtualHostPluginFactory.java | 28 ++++ 15 files changed, 269 insertions(+), 277 deletions(-) delete mode 100644 java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPlugin.java delete mode 100644 java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPluginFactory.java create mode 100644 java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPlugin.java create mode 100644 java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPluginFactory.java delete mode 100644 java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPlugin.java delete mode 100644 java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPluginFactory.java create mode 100644 java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPlugin.java create mode 100644 java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPluginFactory.java (limited to 'java/broker/src') diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/ConfigurationManager.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/ConfigurationManager.java index 3f2966b4a2..9529d1097d 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/ConfigurationManager.java +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/ConfigurationManager.java @@ -23,8 +23,8 @@ package org.apache.qpid.server.configuration; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.ConfigurationException; import org.apache.log4j.Logger; -import org.apache.qpid.server.configuration.plugin.ConfigurationPlugin; -import org.apache.qpid.server.configuration.plugin.ConfigurationPluginFactory; +import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin; +import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory; import org.apache.qpid.server.registry.ApplicationRegistry; import java.util.Map; diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java index 5c3e0911f5..9da36c9b08 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java @@ -26,7 +26,7 @@ import java.util.HashMap; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.ConfigurationException; -import org.apache.qpid.server.configuration.plugin.ConfigurationPlugin; +import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin; public class QueueConfiguration extends ConfigurationPlugin { diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java index 27ec80b1f8..96b2e26f3c 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java @@ -28,8 +28,8 @@ import org.apache.commons.configuration.HierarchicalConfiguration; import org.apache.commons.configuration.SystemConfiguration; import org.apache.commons.configuration.XMLConfiguration; import org.apache.qpid.server.configuration.management.ConfigurationManagementMBean; -import org.apache.qpid.server.configuration.plugin.ConfigurationPlugin; -import org.apache.qpid.server.configuration.plugin.ConfigurationPluginFactory; +import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin; +import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory; import org.apache.qpid.server.virtualhost.VirtualHost; import org.apache.qpid.server.virtualhost.VirtualHostRegistry; import org.apache.qpid.server.registry.ApplicationRegistry; diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java index 696a82b8f2..4e29a3e526 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java @@ -26,8 +26,7 @@ import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.qpid.server.registry.ApplicationRegistry; import org.apache.qpid.server.store.MemoryMessageStore; -import org.apache.qpid.server.configuration.plugin.ConfigurationPlugin; -import org.apache.qpid.server.configuration.plugin.ConfigurationPluginFactory; +import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin; import java.util.HashMap; import java.util.Iterator; diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPlugin.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPlugin.java deleted file mode 100644 index 0822d6debf..0000000000 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPlugin.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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.apache.qpid.server.configuration.plugin; - -import org.apache.commons.configuration.Configuration; -import org.apache.commons.configuration.ConfigurationException; -import org.apache.qpid.server.configuration.ConfigurationManager; -import org.apache.qpid.server.registry.ApplicationRegistry; -import org.apache.log4j.Logger; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -public abstract class ConfigurationPlugin -{ - protected Logger _logger = Logger.getLogger(this.getClass()); - - private Map, ConfigurationPlugin> - _pluginConfiguration = new HashMap, ConfigurationPlugin>(); - - protected Configuration _configuration; - - /** - * The Elements that this Plugin can process. - * i.e. - * For a Queues plugin that would be a list containing: - * queue - the queue entries - * the alerting values for defaults - * exchange - the default exchange - * durable - set the default durablity - * etc - * - * @return - */ - abstract public String[] getElementsProcessed(); - - public Configuration getConfig() - { - return _configuration; - } - - public C getConfiguration(Class plugin) - { - return (C) _pluginConfiguration.get(plugin); - } - - /** - * Sets the configuration for this plugin - * - * @param path - * @param configuration the configuration for this plugin. - */ - - public void setConfiguration(String path, Configuration configuration) throws ConfigurationException - { - _configuration = configuration; - - // Extract a list of elements for processing - Iterator keys = configuration.getKeys(); - - Set elements = new HashSet(); - while (keys.hasNext()) - { - String key = (String) keys.next(); - - int elementNameIndex = key.indexOf("."); - - String element = key.trim(); - if (elementNameIndex != -1) - { - element = key.substring(0, elementNameIndex).trim(); - } - - //Trim any element properties - elementNameIndex = element.indexOf("["); - if (elementNameIndex != -1) - { - element = element.substring(0,elementNameIndex).trim(); - } - - elements.add(element); - } - - - //Remove the items we already expect in the configuration - for (String tag : getElementsProcessed()) - { - elements.remove(tag); - } - - if (_logger.isInfoEnabled()) - { - if (!elements.isEmpty()) - { - _logger.info("Elements to lookup:" + path); - for (String tag : elements) - { - _logger.info(tag); - } - } - } - - // Process the elements in the configuration - for (String element : elements.toArray(new String[elements.size()])) - { - ConfigurationManager configurationManager = ApplicationRegistry.getInstance().getConfigurationManager(); - - String configurationElement = path +"."+ element; - ConfigurationPlugin elementHandler = configurationManager. - getConfigurationPlugin(configurationElement, - configuration.subset(element)); - - - if (elementHandler == null) - { - _logger.warn("Unused configuration element:" + configurationElement); - } - else - { - _pluginConfiguration.put(elementHandler.getClass(), elementHandler); - } - } - } -} - - diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPluginFactory.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPluginFactory.java deleted file mode 100644 index 1286669f22..0000000000 --- a/java/broker/src/main/java/org/apache/qpid/server/configuration/plugin/ConfigurationPluginFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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.apache.qpid.server.configuration.plugin; - -import org.apache.commons.configuration.Configuration; -import org.apache.commons.configuration.ConfigurationException; - -public interface ConfigurationPluginFactory -{ - - /** - * The Parent paths of the configuration that this plugin supports. - * i.e. - * For Queue Elements the parent path is - * virtualhosts.virtualhost - * @return - */ - abstract public String[] getParentPaths(); - - - public ConfigurationPlugin newInstance(String path, Configuration config) throws ConfigurationException; - -} diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPlugin.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPlugin.java new file mode 100644 index 0000000000..dc0410dba6 --- /dev/null +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPlugin.java @@ -0,0 +1,147 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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.apache.qpid.server.configuration.plugins; + +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.ConfigurationException; +import org.apache.qpid.server.configuration.ConfigurationManager; +import org.apache.qpid.server.registry.ApplicationRegistry; +import org.apache.log4j.Logger; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +public abstract class ConfigurationPlugin +{ + protected Logger _logger = Logger.getLogger(this.getClass()); + + private Map, ConfigurationPlugin> + _pluginConfiguration = new HashMap, ConfigurationPlugin>(); + + protected Configuration _configuration; + + /** + * The Elements that this Plugin can process. + * i.e. + * For a Queues plugin that would be a list containing: + * queue - the queue entries + * the alerting values for defaults + * exchange - the default exchange + * durable - set the default durablity + * etc + * + * @return + */ + abstract public String[] getElementsProcessed(); + + public Configuration getConfig() + { + return _configuration; + } + + public C getConfiguration(Class plugin) + { + return (C) _pluginConfiguration.get(plugin); + } + + /** + * Sets the configuration for this plugin + * + * @param path + * @param configuration the configuration for this plugin. + */ + + public void setConfiguration(String path, Configuration configuration) throws ConfigurationException + { + _configuration = configuration; + + // Extract a list of elements for processing + Iterator keys = configuration.getKeys(); + + Set elements = new HashSet(); + while (keys.hasNext()) + { + String key = (String) keys.next(); + + int elementNameIndex = key.indexOf("."); + + String element = key.trim(); + if (elementNameIndex != -1) + { + element = key.substring(0, elementNameIndex).trim(); + } + + //Trim any element properties + elementNameIndex = element.indexOf("["); + if (elementNameIndex != -1) + { + element = element.substring(0,elementNameIndex).trim(); + } + + elements.add(element); + } + + + //Remove the items we already expect in the configuration + for (String tag : getElementsProcessed()) + { + elements.remove(tag); + } + + if (_logger.isInfoEnabled()) + { + if (!elements.isEmpty()) + { + _logger.info("Elements to lookup:" + path); + for (String tag : elements) + { + _logger.info(tag); + } + } + } + + // Process the elements in the configuration + for (String element : elements.toArray(new String[elements.size()])) + { + ConfigurationManager configurationManager = ApplicationRegistry.getInstance().getConfigurationManager(); + + String configurationElement = path +"."+ element; + ConfigurationPlugin elementHandler = configurationManager. + getConfigurationPlugin(configurationElement, + configuration.subset(element)); + + + if (elementHandler == null) + { + _logger.warn("Unused configuration element:" + configurationElement); + } + else + { + _pluginConfiguration.put(elementHandler.getClass(), elementHandler); + } + } + } +} + + diff --git a/java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPluginFactory.java b/java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPluginFactory.java new file mode 100644 index 0000000000..1e928a1728 --- /dev/null +++ b/java/broker/src/main/java/org/apache/qpid/server/configuration/plugins/ConfigurationPluginFactory.java @@ -0,0 +1,41 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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.apache.qpid.server.configuration.plugins; + +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.ConfigurationException; + +public interface ConfigurationPluginFactory +{ + + /** + * The Parent paths of the configuration that this plugin supports. + * i.e. + * For Queue Elements the parent path is + * virtualhosts.virtualhost + * @return + */ + abstract public String[] getParentPaths(); + + + public ConfigurationPlugin newInstance(String path, Configuration config) throws ConfigurationException; + +} diff --git a/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java b/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java index 171de7a701..293a9c5ebc 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java +++ b/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java @@ -24,7 +24,7 @@ import org.apache.felix.framework.Felix; import org.apache.felix.framework.cache.BundleCache; import org.apache.felix.framework.util.FelixConstants; import org.apache.felix.framework.util.StringMap; -import org.apache.qpid.server.configuration.plugin.ConfigurationPluginFactory; +import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory; import org.apache.qpid.server.exchange.ExchangeType; import org.apache.qpid.server.security.access.ACLPlugin; import org.apache.qpid.server.security.access.ACLPluginFactory; @@ -33,7 +33,7 @@ import org.apache.qpid.server.security.access.plugins.DenyAll; import org.apache.qpid.server.security.access.plugins.LegacyAccessPlugin; import org.apache.qpid.server.security.access.plugins.SimpleXML; import org.apache.qpid.server.security.access.plugins.network.FirewallPlugin; -import org.apache.qpid.server.virtualhost.plugin.VirtualHostPluginFactory; +import org.apache.qpid.server.virtualhost.plugins.VirtualHostPluginFactory; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleException; import org.osgi.util.tracker.ServiceTracker; @@ -84,12 +84,12 @@ public class PluginManager "org.apache.qpid.server.management; version=0.7," + "org.apache.qpid.server.protocol; version=0.7," + "org.apache.qpid.server.virtualhost; version=0.7," + - "org.apache.qpid.server.virtualhost.plugin; version=0.7," + + "org.apache.qpid.server.virtualhost.plugins; version=0.7," + "org.apache.qpid.server.registry; version=0.7," + "org.apache.qpid.server.queue; version=0.7," + "org.apache.qpid.server.binding; version=0.7," + "org.apache.qpid.server.configuration; version=0.7," + - "org.apache.qpid.server.configuration.plugin; version=0.7," + + "org.apache.qpid.server.configuration.plugins; version=0.7," + "org.apache.qpid.server.configuration.management; version=0.7," + "org.apache.qpid.server.persistent; version=0.7," + "org.apache.qpid.server.plugins; version=0.7," + diff --git a/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java b/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java index 5b8f8f0bb8..727e902a0c 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java +++ b/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java @@ -202,7 +202,7 @@ public abstract class ApplicationRegistry implements IApplicationRegistry { if (_logger.isInfoEnabled()) { - _logger.info("Shuting down ApplicationRegistry(" + instanceID + "):" + instance); + _logger.info("Shutting down ApplicationRegistry(" + instanceID + "):" + instance); } instance.close(); instance.getBroker().getSystem().removeBroker(instance.getBroker()); @@ -235,7 +235,6 @@ public abstract class ApplicationRegistry implements IApplicationRegistry public void configure() throws ConfigurationException { - _logger.error("Configure AR"); _configurationManager = new ConfigurationManager(); @@ -253,18 +252,14 @@ public abstract class ApplicationRegistry implements IApplicationRegistry public void initialise(int instanceID) throws Exception { - _logger.error("Creating RML:" + this); _rootMessageLogger = new RootMessageLoggerImpl(_configuration, new Log4jMessageLogger()); - _logger.error("Created RML:" + _rootMessageLogger + ":" + this); _registryName = String.valueOf(instanceID); // Set the Actor for current log messages CurrentActor.set(new BrokerActor(_registryName, _rootMessageLogger)); - _logger.error("Init AR:" + this); configure(); - _logger.error("Configured AR:" + this); _qmfService = new QMFService(getConfigStore(), this); @@ -325,8 +320,6 @@ public abstract class ApplicationRegistry implements IApplicationRegistry try { _logger.info("Creating DEFAULT_APPLICATION_REGISTRY: " + _APPLICATION_REGISTRY + " : Instance:" + instanceID); - new Exception().printStackTrace(System.out); - new Exception().printStackTrace(System.err); IApplicationRegistry registry = (IApplicationRegistry) Class.forName(_APPLICATION_REGISTRY).getConstructor((Class[]) null).newInstance((Object[]) null); ApplicationRegistry.initialise(registry, instanceID); _logger.info("Initialised Application Registry:" + instanceID); diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java index 8d78415056..4331bbf972 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java +++ b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java @@ -28,8 +28,8 @@ import org.apache.qpid.AMQException; import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.FieldTable; import org.apache.qpid.server.AMQBrokerManagerMBean; -import org.apache.qpid.server.virtualhost.plugin.VirtualHostPluginFactory; -import org.apache.qpid.server.virtualhost.plugin.VirtualHostPlugin; +import org.apache.qpid.server.virtualhost.plugins.VirtualHostPluginFactory; +import org.apache.qpid.server.virtualhost.plugins.VirtualHostPlugin; import org.apache.qpid.server.binding.BindingFactory; import org.apache.qpid.server.configuration.BrokerConfig; import org.apache.qpid.server.configuration.ConfigStore; diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPlugin.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPlugin.java deleted file mode 100644 index d3b97ff40c..0000000000 --- a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPlugin.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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.apache.qpid.server.virtualhost.plugin; - -public interface VirtualHostPlugin extends Runnable -{ - public void run(); - - /** - * Long value representing the delay between repeats - * - * @return - */ - public long getDelay(); - - /** - * Option to specify what the delay value represents - * @see java.util.concurrent.TimeUnit for valid value. - * @return - */ - public String getTimeUnit(); -} diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPluginFactory.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPluginFactory.java deleted file mode 100644 index bde60fc9ae..0000000000 --- a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugin/VirtualHostPluginFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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.apache.qpid.server.virtualhost.plugin; - -import org.apache.qpid.server.virtualhost.VirtualHost; - -public interface VirtualHostPluginFactory -{ - public VirtualHostPlugin newInstance(VirtualHost vhost); -} diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPlugin.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPlugin.java new file mode 100644 index 0000000000..6c9526346c --- /dev/null +++ b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPlugin.java @@ -0,0 +1,40 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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.apache.qpid.server.virtualhost.plugins; + +public interface VirtualHostPlugin extends Runnable +{ + public void run(); + + /** + * Long value representing the delay between repeats + * + * @return + */ + public long getDelay(); + + /** + * Option to specify what the delay value represents + * @see java.util.concurrent.TimeUnit for valid value. + * @return + */ + public String getTimeUnit(); +} diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPluginFactory.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPluginFactory.java new file mode 100644 index 0000000000..c32ff76f81 --- /dev/null +++ b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/plugins/VirtualHostPluginFactory.java @@ -0,0 +1,28 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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.apache.qpid.server.virtualhost.plugins; + +import org.apache.qpid.server.virtualhost.VirtualHost; + +public interface VirtualHostPluginFactory +{ + public VirtualHostPlugin newInstance(VirtualHost vhost); +} -- cgit v1.2.1