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/jdbc-store/src/main | |
| 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/jdbc-store/src/main')
8 files changed, 8 insertions, 125 deletions
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java index 191cc2ab7a..d528ab9253 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java @@ -23,7 +23,9 @@ package org.apache.qpid.server.store.jdbc; import java.util.Map; import org.apache.qpid.server.plugin.JDBCConnectionProviderFactory; +import org.apache.qpid.server.plugin.PluggableService; +@PluggableService public class DefaultConnectionProviderFactory implements JDBCConnectionProviderFactory { diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java index b5a9d64a04..e1db859a98 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java @@ -25,9 +25,11 @@ import java.util.Map; import org.apache.qpid.server.model.VirtualHost; import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory; import org.apache.qpid.server.plugin.MessageStoreFactory; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.DurableConfigurationStore; import org.apache.qpid.server.store.MessageStore; +@PluggableService public class JDBCMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory { diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.java deleted file mode 100644 index aa3c38ce65..0000000000 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.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.jdbc; - -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 JDBCVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<JDBCVirtualHostNodeImpl> -{ - public JDBCVirtualHostNodeFactory() - { - super(JDBCVirtualHostNodeImpl.class); - } - - @Override - public JDBCVirtualHostNodeImpl createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents) - { - Broker<?> broker = getParent(Broker.class, parents); - return new JDBCVirtualHostNodeImpl(broker, attributes, broker.getTaskExecutor()); - } - -} diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java index 2a1279e74b..8d7c79b656 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java @@ -22,13 +22,11 @@ package org.apache.qpid.server.virtualhostnode.jdbc; 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.ManagedAttribute; import org.apache.qpid.server.model.ManagedAttributeField; 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.jdbc.JDBCMessageStore; import org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory; import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode; @@ -53,9 +51,10 @@ public class JDBCVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<JDB @ManagedAttributeField private String _blobType; - public JDBCVirtualHostNodeImpl(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor) + @ManagedObjectFactoryConstructor + public JDBCVirtualHostNodeImpl(Map<String, Object> attributes, Broker<?> parent) { - super(parent, attributes, taskExecutor); + super(attributes, parent); } @Override diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory deleted file mode 100644 index 03e3a963a5..0000000000 --- a/qpid/java/broker-plugins/jdbc-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.jdbc.JDBCVirtualHostNodeFactory diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory deleted file mode 100644 index a77458f27d..0000000000 --- a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory +++ /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.jdbc.JDBCMessageStoreFactory diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory deleted file mode 100644 index e0ae6e97cc..0000000000 --- a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory +++ /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.jdbc.DefaultConnectionProviderFactory diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory deleted file mode 100644 index a77458f27d..0000000000 --- a/qpid/java/broker-plugins/jdbc-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.jdbc.JDBCMessageStoreFactory |
