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 | |
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')
101 files changed, 246 insertions, 1000 deletions
diff --git a/qpid/java/broker-plugins/access-control/build.xml b/qpid/java/broker-plugins/access-control/build.xml index eea98937d4..abb205f439 100644 --- a/qpid/java/broker-plugins/access-control/build.xml +++ b/qpid/java/broker-plugins/access-control/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins Access Control" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests management/common" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/access-control/pom.xml b/qpid/java/broker-plugins/access-control/pom.xml index ae5f33cd53..ddb90974a7 100644 --- a/qpid/java/broker-plugins/access-control/pom.xml +++ b/qpid/java/broker-plugins/access-control/pom.xml @@ -42,6 +42,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j-version}</version> diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java index 9ba4618b29..1547adc6e5 100644 --- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java +++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java @@ -26,8 +26,10 @@ import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory; import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.ConfiguredObject; import org.apache.qpid.server.plugin.AccessControlProviderFactory; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.util.ResourceBundleLoader; +@PluggableService public class ACLFileAccessControlProviderFactory extends AbstractConfiguredObjectTypeFactory<ACLFileAccessControlProviderImpl> implements AccessControlProviderFactory<ACLFileAccessControlProviderImpl> { public static final String RESOURCE_BUNDLE = "org.apache.qpid.server.security.access.plugins.FileAccessControlProviderAttributeDescriptions"; diff --git a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory b/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory deleted file mode 100644 index 2c5a643ab1..0000000000 --- a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory +++ /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.security.access.plugins.ACLFileAccessControlProviderFactory diff --git a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory deleted file mode 100644 index 2c5a643ab1..0000000000 --- a/qpid/java/broker-plugins/access-control/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.security.access.plugins.ACLFileAccessControlProviderFactory diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml b/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml index 3537be172d..d60861f847 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP 0-10 Protocol" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml b/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml index 925c732c5f..b60cdd054f 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml @@ -38,6 +38,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j-version}</version> diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java index 0d43c84fdd..f9bf697a0d 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java @@ -20,8 +20,11 @@ */ package org.apache.qpid.server.protocol.v0_10; +import java.nio.ByteBuffer; + import org.apache.qpid.server.message.internal.InternalMessage; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.StoreFuture; import org.apache.qpid.server.store.StoredMessage; import org.apache.qpid.server.virtualhost.VirtualHostImpl; @@ -30,8 +33,7 @@ import org.apache.qpid.transport.Header; import org.apache.qpid.transport.MessageDeliveryPriority; import org.apache.qpid.transport.MessageProperties; -import java.nio.ByteBuffer; - +@PluggableService public class MessageConverter_Internal_to_v0_10 implements MessageConverter<InternalMessage, MessageTransferMessage> { @Override diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java index e788eb071e..2a4aeb8b7e 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java @@ -30,6 +30,7 @@ import java.util.Map; import org.apache.qpid.server.message.ServerMessage; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.StoreFuture; import org.apache.qpid.server.store.StoredMessage; import org.apache.qpid.server.util.ConnectionScopedRuntimeException; @@ -40,6 +41,7 @@ import org.apache.qpid.transport.MessageDeliveryPriority; import org.apache.qpid.transport.MessageProperties; import org.apache.qpid.transport.codec.BBEncoder; +@PluggableService public class MessageConverter_v0_10 implements MessageConverter<ServerMessage, MessageTransferMessage> { diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java index f034f8159d..52bef63f7b 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java @@ -20,9 +20,19 @@ */ package org.apache.qpid.server.protocol.v0_10; +import java.io.EOFException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.qpid.server.message.AMQMessageHeader; import org.apache.qpid.server.message.internal.InternalMessage; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.util.ConnectionScopedRuntimeException; import org.apache.qpid.server.virtualhost.VirtualHostImpl; import org.apache.qpid.transport.MessageProperties; @@ -31,15 +41,7 @@ import org.apache.qpid.transport.codec.BBDecoder; import org.apache.qpid.typedmessage.TypedBytesContentReader; import org.apache.qpid.typedmessage.TypedBytesFormatException; -import java.io.EOFException; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - +@PluggableService public class MessageConverter_v0_10_to_Internal implements MessageConverter<MessageTransferMessage, InternalMessage> { @Override diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java index 56c7a358c0..bac7e2d01f 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java @@ -24,8 +24,10 @@ import java.nio.ByteBuffer; import org.apache.qpid.server.message.ServerMessage; import org.apache.qpid.server.plugin.MessageMetaDataType; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.StoredMessage; +@PluggableService public class MessageMetaDataType_0_10 implements MessageMetaDataType<MessageMetaData_0_10> { diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java index 7eab526a17..b1d9fbf676 100644 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java +++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java @@ -28,10 +28,12 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; import org.apache.qpid.server.model.Transport; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.plugin.ProtocolEngineCreator; import org.apache.qpid.transport.ConnectionDelegate; import org.apache.qpid.transport.network.NetworkConnection; +@PluggableService public class ProtocolEngineCreator_0_10 implements ProtocolEngineCreator { diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter deleted file mode 100644 index dd115905a4..0000000000 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter +++ /dev/null @@ -1,21 +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.protocol.v0_10.MessageConverter_v0_10 -org.apache.qpid.server.protocol.v0_10.MessageConverter_Internal_to_v0_10 -org.apache.qpid.server.protocol.v0_10.MessageConverter_v0_10_to_Internal diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType deleted file mode 100644 index 36118fe053..0000000000 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType +++ /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.protocol.v0_10.MessageMetaDataType_0_10 diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator deleted file mode 100644 index 3d94e26671..0000000000 --- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator +++ /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.protocol.v0_10.ProtocolEngineCreator_0_10 diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml b/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml index 0ab2b0b833..67c0b7ab4f 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP 0-8 Protocol" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml b/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml index 945b66b23a..35ec13709e 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml @@ -38,6 +38,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j-version}</version> diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java index 28c1e528f4..2ad6fc2ca6 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java @@ -20,6 +20,15 @@ */ package org.apache.qpid.server.protocol.v0_8; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.BasicContentHeaderProperties; import org.apache.qpid.framing.ContentHeaderBody; @@ -27,21 +36,14 @@ import org.apache.qpid.framing.FieldTable; import org.apache.qpid.framing.abstraction.MessagePublishInfo; import org.apache.qpid.server.message.internal.InternalMessage; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.StoreFuture; import org.apache.qpid.server.store.StoredMessage; import org.apache.qpid.server.util.ConnectionScopedRuntimeException; import org.apache.qpid.server.virtualhost.VirtualHostImpl; import org.apache.qpid.transport.codec.BBEncoder; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectOutputStream; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - +@PluggableService public class MessageConverter_Internal_to_v0_8 implements MessageConverter<InternalMessage, AMQMessage> { private static final int BASIC_CLASS_ID = 60; diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java index f077617446..0b98699b4a 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java @@ -20,10 +20,21 @@ */ package org.apache.qpid.server.protocol.v0_8; +import java.io.EOFException; +import java.net.URISyntaxException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.server.message.AMQMessageHeader; import org.apache.qpid.server.message.internal.InternalMessage; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.util.ConnectionScopedRuntimeException; import org.apache.qpid.server.virtualhost.VirtualHostImpl; import org.apache.qpid.transport.codec.BBDecoder; @@ -31,16 +42,7 @@ import org.apache.qpid.typedmessage.TypedBytesContentReader; import org.apache.qpid.typedmessage.TypedBytesFormatException; import org.apache.qpid.url.AMQBindingURL; -import java.io.EOFException; -import java.net.URISyntaxException; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - +@PluggableService public class MessageConverter_v0_8_to_Internal implements MessageConverter<AMQMessage, InternalMessage> { @Override diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java index dd91cb33b3..5e263cd3b0 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java @@ -24,8 +24,10 @@ import java.nio.ByteBuffer; import org.apache.qpid.server.message.ServerMessage; import org.apache.qpid.server.plugin.MessageMetaDataType; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.StoredMessage; +@PluggableService public class MessageMetaDataType_0_8 implements MessageMetaDataType<MessageMetaData> { diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java index f0893078df..d88d8c3c2a 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java @@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; import org.apache.qpid.server.model.Transport; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.plugin.ProtocolEngineCreator; import org.apache.qpid.transport.network.NetworkConnection; +@PluggableService public class ProtocolEngineCreator_0_8 implements ProtocolEngineCreator { private static final byte[] AMQP_0_8_HEADER = diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java index 1cc5c7603c..4f9198a509 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java @@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; import org.apache.qpid.server.model.Transport; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.plugin.ProtocolEngineCreator; import org.apache.qpid.transport.network.NetworkConnection; +@PluggableService public class ProtocolEngineCreator_0_9 implements ProtocolEngineCreator { private static final byte[] AMQP_0_9_HEADER = diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java index e51d74c87d..5251e760ff 100644 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java +++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java @@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; import org.apache.qpid.server.model.Transport; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.plugin.ProtocolEngineCreator; import org.apache.qpid.transport.network.NetworkConnection; +@PluggableService public class ProtocolEngineCreator_0_9_1 implements ProtocolEngineCreator { diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter deleted file mode 100644 index d87bc2566f..0000000000 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter +++ /dev/null @@ -1,20 +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.protocol.v0_8.MessageConverter_Internal_to_v0_8 -org.apache.qpid.server.protocol.v0_8.MessageConverter_v0_8_to_Internal
\ No newline at end of file diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType deleted file mode 100644 index 43ad3adf13..0000000000 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType +++ /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.protocol.v0_8.MessageMetaDataType_0_8 diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator deleted file mode 100644 index 57ca615a04..0000000000 --- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator +++ /dev/null @@ -1,21 +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.protocol.v0_8.ProtocolEngineCreator_0_8 -org.apache.qpid.server.protocol.v0_8.ProtocolEngineCreator_0_9 -org.apache.qpid.server.protocol.v0_8.ProtocolEngineCreator_0_9_1 diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml b/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml index 00926c0787..2315ba557d 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP 1.0 Protocol" default="build"> - <property name="module.depends" value="common broker-core amqp-1-0-common" /> + <property name="module.depends" value="common broker-core amqp-1-0-common broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml b/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml index 8057af858e..754b53f443 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml @@ -39,6 +39,13 @@ <dependency> <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> <artifactId>qpid-amqp-1-0-common</artifactId> <version>${project.version}</version> </dependency> diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java index 1764eec84d..0a6fec1200 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java @@ -20,6 +20,15 @@ */ package org.apache.qpid.server.protocol.v1_0; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + import org.apache.qpid.amqp_1_0.messaging.SectionEncoder; import org.apache.qpid.amqp_1_0.type.Binary; import org.apache.qpid.amqp_1_0.type.Section; @@ -31,17 +40,10 @@ import org.apache.qpid.amqp_1_0.type.messaging.Data; import org.apache.qpid.amqp_1_0.type.messaging.Header; import org.apache.qpid.amqp_1_0.type.messaging.Properties; import org.apache.qpid.server.message.internal.InternalMessage; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.util.ConnectionScopedRuntimeException; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectOutputStream; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; - +@PluggableService public class MessageConverter_Internal_to_v1_0 extends MessageConverter_to_1_0<InternalMessage> { private static final Charset UTF_8 = Charset.forName("UTF-8"); diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java index 077ea7819b..a17a9585c1 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java @@ -23,8 +23,10 @@ package org.apache.qpid.server.protocol.v1_0; import org.apache.qpid.amqp_1_0.type.codec.AMQPDescribedTypeRegistry; import org.apache.qpid.server.message.internal.InternalMessage; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.virtualhost.VirtualHostImpl; +@PluggableService public class MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage> { diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java index 15f1d5cad4..8f8a868365 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java @@ -24,8 +24,10 @@ import java.nio.ByteBuffer; import org.apache.qpid.server.message.ServerMessage; import org.apache.qpid.server.plugin.MessageMetaDataType; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.StoredMessage; +@PluggableService public class MessageMetaDataType_1_0 implements MessageMetaDataType<MessageMetaData_1_0> { diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java index 4b7a6d0e55..8eb89cade6 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java @@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; import org.apache.qpid.server.model.Transport; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.plugin.ProtocolEngineCreator; import org.apache.qpid.transport.network.NetworkConnection; +@PluggableService public class ProtocolEngineCreator_1_0_0_SASL implements ProtocolEngineCreator { private static final byte[] AMQP_SASL_1_0_0_HEADER = diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter deleted file mode 100644 index aa24847805..0000000000 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter +++ /dev/null @@ -1,20 +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.protocol.v1_0.MessageConverter_Internal_to_v1_0 -org.apache.qpid.server.protocol.v1_0.MessageConverter_v1_0_to_Internal
\ No newline at end of file diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType deleted file mode 100644 index 91c673215c..0000000000 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType +++ /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.protocol.v1_0.MessageMetaDataType_1_0 diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator deleted file mode 100644 index 190574b7cc..0000000000 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator +++ /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.protocol.v1_0.ProtocolEngineCreator_1_0_0_SASL diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml index 161a4c394c..0e4a9f1120 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP 0.8 to 1.0 MessageConversion" default="build"> - <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-1-0-protocol broker-plugins/amqp-0-10-protocol" /> + <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-1-0-protocol broker-plugins/amqp-0-10-protocol broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml index 666aab338e..fc19c1b36e 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml @@ -39,6 +39,13 @@ <dependency> <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> <artifactId>qpid-common</artifactId> <version>${project.version}</version> </dependency> diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java index 26dd8e5f37..84a57d474a 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java @@ -32,6 +32,7 @@ import org.apache.qpid.amqp_1_0.type.UnsignedInteger; import org.apache.qpid.amqp_1_0.type.messaging.ApplicationProperties; import org.apache.qpid.amqp_1_0.type.messaging.Header; import org.apache.qpid.amqp_1_0.type.messaging.Properties; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage; import org.apache.qpid.server.protocol.v1_0.MessageConverter_to_1_0; import org.apache.qpid.server.protocol.v1_0.MessageMetaData_1_0; @@ -39,6 +40,7 @@ import org.apache.qpid.transport.DeliveryProperties; import org.apache.qpid.transport.MessageDeliveryMode; import org.apache.qpid.transport.MessageProperties; +@PluggableService public class MessageConverter_0_10_to_1_0 extends MessageConverter_to_1_0<MessageTransferMessage> { @Override diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java index 01477ebb05..3974198f62 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java @@ -20,8 +20,11 @@ */ package org.apache.qpid.server.protocol.converter.v0_10_v1_0; +import java.nio.ByteBuffer; + import org.apache.qpid.server.message.AMQMessageHeader; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.protocol.v0_10.MessageMetaData_0_10; import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage; import org.apache.qpid.server.protocol.v1_0.MessageConverter_from_1_0; @@ -35,8 +38,7 @@ import org.apache.qpid.transport.MessageDeliveryPriority; import org.apache.qpid.transport.MessageProperties; import org.apache.qpid.transport.ReplyTo; -import java.nio.ByteBuffer; - +@PluggableService public class MessageConverter_1_0_to_v0_10 implements MessageConverter<Message_1_0, MessageTransferMessage> { diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter deleted file mode 100644 index 4c9e612f32..0000000000 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter +++ /dev/null @@ -1,20 +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.protocol.converter.v0_10_v1_0.MessageConverter_0_10_to_1_0 -org.apache.qpid.server.protocol.converter.v0_10_v1_0.MessageConverter_1_0_to_v0_10 diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml index 26a89bfed9..d7f5898c4c 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP 0.8 to 0.10 MessageConversion" default="build"> - <property name="module.depends" value="common broker-core broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol" /> + <property name="module.depends" value="common broker-core broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml index 9898834055..6911ea8ae3 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml @@ -39,6 +39,13 @@ <dependency> <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> <artifactId>qpid-common</artifactId> <version>${project.version}</version> </dependency> diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java index 9a28efbf1a..e9fe0b59fa 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java @@ -32,6 +32,7 @@ import org.apache.qpid.framing.FieldTable; import org.apache.qpid.framing.abstraction.MessagePublishInfo; import org.apache.qpid.server.exchange.ExchangeImpl; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage; import org.apache.qpid.server.protocol.v0_8.AMQMessage; import org.apache.qpid.server.protocol.v0_8.MessageMetaData; @@ -44,6 +45,7 @@ import org.apache.qpid.transport.MessageDeliveryMode; import org.apache.qpid.transport.MessageProperties; import org.apache.qpid.transport.ReplyTo; +@PluggableService public class MessageConverter_0_10_to_0_8 implements MessageConverter<MessageTransferMessage, AMQMessage> { private static final int BASIC_CLASS_ID = 60; diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java index c9f43b36f8..b8073d149b 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java @@ -28,6 +28,7 @@ import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.BasicContentHeaderProperties; import org.apache.qpid.framing.FieldTable; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.protocol.v0_10.MessageMetaData_0_10; import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage; import org.apache.qpid.server.protocol.v0_8.AMQMessage; @@ -41,6 +42,7 @@ import org.apache.qpid.transport.MessageProperties; import org.apache.qpid.transport.ReplyTo; import org.apache.qpid.url.AMQBindingURL; +@PluggableService public class MessageConverter_0_8_to_0_10 implements MessageConverter<AMQMessage, MessageTransferMessage> { @Override diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter deleted file mode 100644 index 5aeef786ae..0000000000 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter +++ /dev/null @@ -1,20 +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.protocol.converter.v0_8_v0_10.MessageConverter_0_8_to_0_10 -org.apache.qpid.server.protocol.converter.v0_8_v0_10.MessageConverter_0_10_to_0_8 diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml index f28b6760e5..d14c9b0680 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP 0.8 to 1.0 MessageConversion" default="build"> - <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-0-8-protocol broker-plugins/amqp-1-0-protocol" /> + <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-0-8-protocol broker-plugins/amqp-1-0-protocol broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml index 957c4828cb..e25a758e84 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml @@ -39,6 +39,13 @@ <dependency> <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> <artifactId>qpid-common</artifactId> <version>${project.version}</version> </dependency> diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java index a0026ccd8f..eb9d6842e4 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java @@ -35,11 +35,13 @@ import org.apache.qpid.amqp_1_0.type.messaging.Properties; import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.BasicContentHeaderProperties; import org.apache.qpid.framing.FieldTable; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.protocol.v0_8.AMQMessage; import org.apache.qpid.server.protocol.v1_0.MessageConverter_to_1_0; import org.apache.qpid.server.protocol.v1_0.MessageMetaData_1_0; import org.apache.qpid.url.AMQBindingURL; +@PluggableService public class MessageConverter_0_8_to_1_0 extends MessageConverter_to_1_0<AMQMessage> { @Override diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java index 576db8f83e..d6abe94f30 100644 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java +++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java @@ -20,12 +20,17 @@ */ package org.apache.qpid.server.protocol.converter.v0_8_v1_0; +import java.nio.ByteBuffer; +import java.util.LinkedHashMap; +import java.util.Map; + import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.BasicContentHeaderProperties; import org.apache.qpid.framing.ContentHeaderBody; import org.apache.qpid.framing.FieldTable; import org.apache.qpid.framing.abstraction.MessagePublishInfo; import org.apache.qpid.server.plugin.MessageConverter; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.protocol.v0_8.AMQMessage; import org.apache.qpid.server.protocol.v0_8.MessageMetaData; import org.apache.qpid.server.protocol.v1_0.MessageConverter_from_1_0; @@ -35,10 +40,7 @@ import org.apache.qpid.server.store.StoreFuture; import org.apache.qpid.server.store.StoredMessage; import org.apache.qpid.server.virtualhost.VirtualHostImpl; -import java.nio.ByteBuffer; -import java.util.LinkedHashMap; -import java.util.Map; - +@PluggableService public class MessageConverter_1_0_to_v0_8 implements MessageConverter<Message_1_0, AMQMessage> { private static final int BASIC_CLASS_ID = 60; diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter deleted file mode 100644 index 61259f870d..0000000000 --- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter +++ /dev/null @@ -1,20 +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.protocol.converter.v0_8_v1_0.MessageConverter_0_8_to_1_0 -org.apache.qpid.server.protocol.converter.v0_8_v1_0.MessageConverter_1_0_to_v0_8 diff --git a/qpid/java/broker-plugins/derby-store/build.xml b/qpid/java/broker-plugins/derby-store/build.xml index 95d3263fbc..fb71bc46a4 100644 --- a/qpid/java/broker-plugins/derby-store/build.xml +++ b/qpid/java/broker-plugins/derby-store/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins Derby Store" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/derby-store/pom.xml b/qpid/java/broker-plugins/derby-store/pom.xml index b39a4db4af..c3c45e62ee 100644 --- a/qpid/java/broker-plugins/derby-store/pom.xml +++ b/qpid/java/broker-plugins/derby-store/pom.xml @@ -37,6 +37,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>${derby-version}</version> diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java index 75711547e1..13c897135d 100644 --- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java +++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.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 DerbyMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory { diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java index f01391c0bf..f65cc78f6a 100644 --- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java +++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java @@ -23,10 +23,10 @@ package org.apache.qpid.server.virtualhostnode.derby; 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.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.derby.DerbyMessageStoreFactory; import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode; @@ -38,9 +38,10 @@ public class DerbyVirtualHostNode extends AbstractStandardVirtualHostNode<DerbyV @ManagedAttributeField private String _storePath; - public DerbyVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor) + @ManagedObjectFactoryConstructor + public DerbyVirtualHostNode(Map<String, Object> attributes, Broker<?> parent) { - super(parent, attributes, taskExecutor); + super(attributes, parent); } @Override diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java deleted file mode 100644 index 7b01511036..0000000000 --- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java +++ /dev/null @@ -1,45 +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.derby; - -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 DerbyVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<DerbyVirtualHostNode> -{ - - public DerbyVirtualHostNodeFactory() - { - super(DerbyVirtualHostNode.class); - } - - @Override - public DerbyVirtualHostNode createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents) - { - Broker<?> broker = getParent(Broker.class, parents); - return new DerbyVirtualHostNode(broker, attributes, broker.getTaskExecutor()); - } - -} diff --git a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory deleted file mode 100644 index 9a942db521..0000000000 --- a/qpid/java/broker-plugins/derby-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.derby.DerbyVirtualHostNodeFactory diff --git a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory b/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory deleted file mode 100644 index 88ca1fed5e..0000000000 --- a/qpid/java/broker-plugins/derby-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.derby.DerbyMessageStoreFactory diff --git a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory deleted file mode 100644 index 88ca1fed5e..0000000000 --- a/qpid/java/broker-plugins/derby-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.derby.DerbyMessageStoreFactory diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/build.xml b/qpid/java/broker-plugins/jdbc-provider-bone/build.xml index 8c8e44c072..5cc1edcef1 100644 --- a/qpid/java/broker-plugins/jdbc-provider-bone/build.xml +++ b/qpid/java/broker-plugins/jdbc-provider-bone/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="jdbc-provider-bone" xmlns:ivy="antlib:org.apache.ivy.ant" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.genpom" value="true"/> <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker-core=provided"/> diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml b/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml index 86f28e2af0..174b74bf00 100644 --- a/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml +++ b/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml @@ -38,6 +38,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>com.jolbox</groupId> <artifactId>bonecp</artifactId> <version>${bonecp-version}</version> diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java index 3668ba308e..c1345cfe54 100644 --- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java +++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java @@ -24,8 +24,10 @@ import java.sql.SQLException; import java.util.Map; import org.apache.qpid.server.plugin.JDBCConnectionProviderFactory; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.store.jdbc.ConnectionProvider; +@PluggableService public class BoneCPConnectionProviderFactory implements JDBCConnectionProviderFactory { @Override diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory deleted file mode 100644 index 70157b44c3..0000000000 --- a/qpid/java/broker-plugins/jdbc-provider-bone/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.bonecp.BoneCPConnectionProviderFactory diff --git a/qpid/java/broker-plugins/jdbc-store/build.xml b/qpid/java/broker-plugins/jdbc-store/build.xml index 4a8e72898c..aa0f8aca94 100644 --- a/qpid/java/broker-plugins/jdbc-store/build.xml +++ b/qpid/java/broker-plugins/jdbc-store/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins JDBC Store" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/jdbc-store/pom.xml b/qpid/java/broker-plugins/jdbc-store/pom.xml index 6453cf53b5..78675e332b 100644 --- a/qpid/java/broker-plugins/jdbc-store/pom.xml +++ b/qpid/java/broker-plugins/jdbc-store/pom.xml @@ -38,6 +38,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j-version}</version> 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 diff --git a/qpid/java/broker-plugins/management-amqp/build.xml b/qpid/java/broker-plugins/management-amqp/build.xml index 542bb952f1..5ed0fa87f3 100644 --- a/qpid/java/broker-plugins/management-amqp/build.xml +++ b/qpid/java/broker-plugins/management-amqp/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins AMQP Management" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/management-amqp/pom.xml b/qpid/java/broker-plugins/management-amqp/pom.xml index b8aa40a72f..dd4c8d7fe5 100644 --- a/qpid/java/broker-plugins/management-amqp/pom.xml +++ b/qpid/java/broker-plugins/management-amqp/pom.xml @@ -39,7 +39,15 @@ <scope>provided</scope> </dependency> - </dependencies> + + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + </dependencies> <build> </build> diff --git a/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java b/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java index ab1fd7cf38..e977c027a1 100644 --- a/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java +++ b/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java @@ -20,8 +20,10 @@ */ package org.apache.qpid.server.management.amqp; +import org.apache.qpid.server.plugin.PluggableService; import org.apache.qpid.server.plugin.SystemNodeCreator; +@PluggableService public class ManagementNodeCreator implements SystemNodeCreator { @Override diff --git a/qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator b/qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator deleted file mode 100644 index 767f93782b..0000000000 --- a/qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator +++ /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.management.amqp.ManagementNodeCreator diff --git a/qpid/java/broker-plugins/management-http/build.xml b/qpid/java/broker-plugins/management-http/build.xml index d921b91580..e4ad1d9e4b 100644 --- a/qpid/java/broker-plugins/management-http/build.xml +++ b/qpid/java/broker-plugins/management-http/build.xml @@ -18,7 +18,7 @@ --> <project name="Qpid Broker-Plugins Management HTTP" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="broker-core/tests qpid-test-utils management/common client" /> <property name="module.genpom" value="true" /> diff --git a/qpid/java/broker-plugins/management-http/pom.xml b/qpid/java/broker-plugins/management-http/pom.xml index c66bda224f..de6089dc1d 100644 --- a/qpid/java/broker-plugins/management-http/pom.xml +++ b/qpid/java/broker-plugins/management-http/pom.xml @@ -38,6 +38,13 @@ </dependency> <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j-version}</version> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java index 5c5f53f676..5b7c23ef2e 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java @@ -106,6 +106,7 @@ public class HttpManagement extends AbstractPluginAdapter<HttpManagement> implem @ManagedAttributeField private int _sessionTimeout; + @ManagedObjectFactoryConstructor public HttpManagement(Map<String, Object> attributes, Broker broker) { super(attributes, broker); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java deleted file mode 100644 index 518788a3d3..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java +++ /dev/null @@ -1,43 +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.management.plugin; - -import java.util.HashMap; -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 HttpManagementFactory extends AbstractConfiguredObjectTypeFactory<HttpManagement> -{ - - public HttpManagementFactory() - { - super(HttpManagement.class); - } - - @Override - public HttpManagement createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents) - { - Map<String,Object> attributesWithoutId = new HashMap<String, Object>(attributes); - return new HttpManagement(attributes, getParent(Broker.class,parents)); - } - -} diff --git a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory deleted file mode 100644 index 316698a10e..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory +++ /dev/null @@ -1,21 +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.management.plugin.HttpManagementFactory - - diff --git a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory b/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory deleted file mode 100644 index 7ffb9a9013..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory +++ /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.management.plugin.HttpManagementFactory diff --git a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java deleted file mode 100644 index 809b2405b1..0000000000 --- a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java +++ /dev/null @@ -1,63 +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.management.plugin; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import org.apache.qpid.server.model.Broker; -import org.apache.qpid.server.model.BrokerModel; -import org.apache.qpid.server.model.ConfiguredObject; -import org.apache.qpid.server.model.ConfiguredObjectFactory; -import org.apache.qpid.server.model.ConfiguredObjectFactoryImpl; -import org.apache.qpid.test.utils.QpidTestCase; - -public class HttpManagementFactoryTest extends QpidTestCase -{ - private static final int SESSION_TIMEOUT = 3600; - - private HttpManagementFactory _pluginFactory = new HttpManagementFactory(); - private Map<String, Object> _attributes = new HashMap<String, Object>(); - private Broker _broker = mock(Broker.class); - private UUID _id = UUID.randomUUID(); - - - public void testCreateInstance() throws Exception - { - _attributes.put(ConfiguredObject.NAME, getName()); - _attributes.put(ConfiguredObject.TYPE, HttpManagement.PLUGIN_TYPE); - _attributes.put(HttpManagement.TIME_OUT, SESSION_TIMEOUT); - _attributes.put(ConfiguredObject.ID, _id); - when(_broker.getCategoryClass()).thenReturn(Broker.class); - ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance()); - when(_broker.getObjectFactory()).thenReturn(objectFactory); - when(_broker.getModel()).thenReturn(objectFactory.getModel()); - - HttpManagement management = _pluginFactory.createInstance(_attributes, _broker); - management.open(); - - assertEquals(_broker, management.getParent(Broker.class)); - assertEquals(SESSION_TIMEOUT, management.getSessionTimeout()); - } - -} diff --git a/qpid/java/broker-plugins/management-jmx/build.xml b/qpid/java/broker-plugins/management-jmx/build.xml index 0209ecbd7a..ae7e410474 100644 --- a/qpid/java/broker-plugins/management-jmx/build.xml +++ b/qpid/java/broker-plugins/management-jmx/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins Management JMX" default="build"> - <property name="module.depends" value="common broker-core management/common" /> + <property name="module.depends" value="common broker-core management/common broker-codegen" /> <property name="module.test.depends" value="broker-core/tests qpid-test-utils management/common client" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/management-jmx/pom.xml b/qpid/java/broker-plugins/management-jmx/pom.xml index 64d0db3cb2..f3fa0d5545 100644 --- a/qpid/java/broker-plugins/management-jmx/pom.xml +++ b/qpid/java/broker-plugins/management-jmx/pom.xml @@ -39,6 +39,13 @@ <dependency> <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> <artifactId>qpid-management-common</artifactId> <version>${project.version}</version> </dependency> diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java deleted file mode 100644 index 335e4fe50f..0000000000 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java +++ /dev/null @@ -1,39 +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.jmx; - -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 JMXManagementFactory extends AbstractConfiguredObjectTypeFactory<JMXManagementPluginImpl> -{ - public JMXManagementFactory() - { - super(JMXManagementPluginImpl.class); - } - - @Override - public JMXManagementPluginImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents) - { - return new JMXManagementPluginImpl(attributes,getParent(Broker.class,parents)); - } -} diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java index 82aa806bba..aa823d7f6a 100644 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java +++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java @@ -43,6 +43,7 @@ import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.model.ConfigurationChangeListener; import org.apache.qpid.server.model.ConfiguredObject; import org.apache.qpid.server.model.ManagedAttributeField; +import org.apache.qpid.server.model.ManagedObjectFactoryConstructor; import org.apache.qpid.server.model.PasswordCredentialManagingAuthenticationProvider; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; @@ -80,6 +81,7 @@ public class JMXManagementPluginImpl @ManagedAttributeField private boolean _usePlatformMBeanServer; + @ManagedObjectFactoryConstructor public JMXManagementPluginImpl(Map<String, Object> attributes, Broker broker) { super(attributes, broker); diff --git a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory deleted file mode 100644 index d77477e044..0000000000 --- a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory +++ /dev/null @@ -1,21 +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.jmx.JMXManagementFactory - - diff --git a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory b/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory deleted file mode 100644 index 8fa778269e..0000000000 --- a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory +++ /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.jmx.JMXManagementFactory diff --git a/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java b/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java deleted file mode 100644 index 3014621913..0000000000 --- a/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java +++ /dev/null @@ -1,61 +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.jmx; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -import org.apache.qpid.server.model.Broker; -import org.apache.qpid.server.model.BrokerModel; -import org.apache.qpid.server.model.ConfiguredObject; -import org.apache.qpid.server.model.ConfiguredObjectFactory; -import org.apache.qpid.server.model.ConfiguredObjectFactoryImpl; -import org.apache.qpid.test.utils.QpidTestCase; - -public class JMXManagementFactoryTest extends QpidTestCase -{ - private final JMXManagementFactory _jmxManagementFactory = new JMXManagementFactory(); - private final Map<String, Object> _attributes = new HashMap<String, Object>(); - private final Broker _broker = mock(Broker.class); - private UUID _id = UUID.randomUUID(); - - public void testJMXConfigured() throws Exception - { - _attributes.put(ConfiguredObject.ID,UUID.randomUUID()); - _attributes.put(ConfiguredObject.TYPE, JMXManagementPlugin.PLUGIN_TYPE); - _attributes.put(ConfiguredObject.NAME, getName()); - ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance()); - - when(_broker.getObjectFactory()).thenReturn(objectFactory); - when(_broker.getModel()).thenReturn(objectFactory.getModel()); - when(_broker.getCategoryClass()).thenReturn(Broker.class); - - JMXManagementPlugin jmxManagement = _jmxManagementFactory.createInstance( _attributes, _broker); - jmxManagement.open(); - assertNotNull(jmxManagement); - assertEquals("Unexpected plugin type", JMXManagementPlugin.PLUGIN_TYPE, jmxManagement.getType()); - assertEquals("Unexpected default mbean platform", Boolean.parseBoolean(JMXManagementPlugin.DEFAULT_USE_PLATFORM_MBEAN_SERVER), jmxManagement.getUsePlatformMBeanServer()); - } - - -} diff --git a/qpid/java/broker-plugins/memory-store/build.xml b/qpid/java/broker-plugins/memory-store/build.xml index 6d107b7803..5bbc79f9c6 100644 --- a/qpid/java/broker-plugins/memory-store/build.xml +++ b/qpid/java/broker-plugins/memory-store/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins Memory Store" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/memory-store/pom.xml b/qpid/java/broker-plugins/memory-store/pom.xml index 8bec7ef981..e3bd07ab8d 100644 --- a/qpid/java/broker-plugins/memory-store/pom.xml +++ b/qpid/java/broker-plugins/memory-store/pom.xml @@ -37,6 +37,13 @@ <scope>provided</scope> </dependency> + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + <!-- test dependencies --> <dependency> <groupId>org.apache.qpid</groupId> 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 diff --git a/qpid/java/broker-plugins/websocket/build.xml b/qpid/java/broker-plugins/websocket/build.xml index fc3dd3b846..05fb0f3286 100644 --- a/qpid/java/broker-plugins/websocket/build.xml +++ b/qpid/java/broker-plugins/websocket/build.xml @@ -17,7 +17,7 @@ - under the License. --> <project name="Qpid Broker-Plugins Websocket Transport" default="build"> - <property name="module.depends" value="common broker-core" /> + <property name="module.depends" value="common broker-core broker-codegen" /> <property name="module.test.depends" value="qpid-test-utils broker-core/tests" /> <property name="module.genpom" value="true"/> diff --git a/qpid/java/broker-plugins/websocket/pom.xml b/qpid/java/broker-plugins/websocket/pom.xml index 48fc79becd..deec92412b 100644 --- a/qpid/java/broker-plugins/websocket/pom.xml +++ b/qpid/java/broker-plugins/websocket/pom.xml @@ -37,6 +37,14 @@ <scope>provided</scope> </dependency> + + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-broker-codegen</artifactId> + <version>${project.version}</version> + <optional>true</optional> + </dependency> + <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-servlet_3.0_spec</artifactId> @@ -66,4 +74,4 @@ <build> </build> -</project>
\ No newline at end of file +</project> diff --git a/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java b/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java index e7c5a786b5..e3db7e3686 100644 --- a/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java +++ b/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java @@ -20,16 +20,17 @@ */ package org.apache.qpid.server.transport.websocket; -import org.apache.qpid.server.model.Transport; -import org.apache.qpid.server.plugin.TransportProviderFactory; -import org.apache.qpid.server.transport.TransportProvider; - import java.util.Arrays; -import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; import java.util.Set; +import org.apache.qpid.server.model.Transport; +import org.apache.qpid.server.plugin.PluggableService; +import org.apache.qpid.server.plugin.TransportProviderFactory; +import org.apache.qpid.server.transport.TransportProvider; + +@PluggableService public class WebSocketTransportProviderFactory implements TransportProviderFactory { diff --git a/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory b/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory deleted file mode 100644 index 55b88cc7be..0000000000 --- a/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory +++ /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.transport.websocket.WebSocketTransportProviderFactory
\ No newline at end of file |