diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-04-28 02:25:27 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-04-28 02:25:27 +0000 |
| commit | e93df1d676c748f942daaf5fb0c4d4dd4ea867a2 (patch) | |
| tree | 334bdee0947d54ee5e9f366331e222db2e749d38 /qpid/java/broker-plugins/memory-store/src | |
| parent | 206d461b36995e741ca5a1edcdb2b28f8835832a (diff) | |
| download | qpid-python-e93df1d676c748f942daaf5fb0c4d4dd4ea867a2.tar.gz | |
QPID-5726 : [Java Broker] Use annotation processing to generate object factories and service definitions
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1590547 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/memory-store/src')
5 files changed, 6 insertions, 85 deletions
diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java index 92f1e05870..d5d5969a47 100644 --- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java +++ b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java @@ -24,7 +24,9 @@ import java.util.Map; import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory; import org.apache.qpid.server.plugin.MessageStoreFactory; +import org.apache.qpid.server.plugin.PluggableService; +@PluggableService public class MemoryMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory { diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java index 89c4851b38..ce587388ce 100644 --- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java +++ b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java @@ -22,9 +22,9 @@ package org.apache.qpid.server.virtualhostnode.memory; import java.util.Map; -import org.apache.qpid.server.configuration.updater.TaskExecutor; import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.ManagedObject; +import org.apache.qpid.server.model.ManagedObjectFactoryConstructor; import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory; import org.apache.qpid.server.store.MemoryMessageStoreFactory; import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode; @@ -33,9 +33,10 @@ import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode; public class MemoryVirtualHostNode extends AbstractStandardVirtualHostNode<MemoryVirtualHostNode> { - public MemoryVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor) + @ManagedObjectFactoryConstructor + public MemoryVirtualHostNode(Map<String, Object> attributes, Broker<?> parent) { - super(parent, attributes, taskExecutor); + super(attributes, parent); } @Override diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java deleted file mode 100644 index f19ff037de..0000000000 --- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java +++ /dev/null @@ -1,44 +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.virtualhostnode.memory; - -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; - -public class MemoryVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<MemoryVirtualHostNode> -{ - - public MemoryVirtualHostNodeFactory() - { - super(MemoryVirtualHostNode.class); - } - - @Override - protected MemoryVirtualHostNode createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents) - { - Broker<?> broker = getParent(Broker.class, parents); - return new MemoryVirtualHostNode(broker, attributes, broker.getTaskExecutor()); - } - -} diff --git a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory deleted file mode 100644 index a29a1b43f9..0000000000 --- a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory +++ /dev/null @@ -1,19 +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. -# -org.apache.qpid.server.virtualhostnode.memory.MemoryVirtualHostNodeFactory diff --git a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory deleted file mode 100644 index 02f22eb21a..0000000000 --- a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory +++ /dev/null @@ -1,19 +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. -# -org.apache.qpid.server.store.MemoryMessageStoreFactory |
