http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/BeginFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/BeginFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/BeginFrame.java new file mode 100644 index 0000000..b350fd1 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/BeginFrame.java @@ -0,0 +1,110 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class BeginFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:begin:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000011L); + + + private static final int FIELD_REMOTE_CHANNEL = 0; + private static final int FIELD_NEXT_OUTGOING_ID = 1; + private static final int FIELD_INCOMING_WINDOW = 2; + private static final int FIELD_OUTGOING_WINDOW = 3; + private static final int FIELD_HANDLE_MAX = 4; + private static final int FIELD_OFFERED_CAPABILITIES = 5; + private static final int FIELD_DESIRED_CAPABILITIES = 6; + private static final int FIELD_PROPERTIES = 7; + + public BeginFrame(Object... fields) + { + super(8); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public BeginFrame setRemoteChannel(Object o) + { + getFields()[FIELD_REMOTE_CHANNEL] = o; + return this; + } + + public BeginFrame setNextOutgoingId(Object o) + { + getFields()[FIELD_NEXT_OUTGOING_ID] = o; + return this; + } + + public BeginFrame setIncomingWindow(Object o) + { + getFields()[FIELD_INCOMING_WINDOW] = o; + return this; + } + + public BeginFrame setOutgoingWindow(Object o) + { + getFields()[FIELD_OUTGOING_WINDOW] = o; + return this; + } + + public BeginFrame setHandleMax(Object o) + { + getFields()[FIELD_HANDLE_MAX] = o; + return this; + } + + public BeginFrame setOfferedCapabilities(Object o) + { + getFields()[FIELD_OFFERED_CAPABILITIES] = o; + return this; + } + + public BeginFrame setDesiredCapabilities(Object o) + { + getFields()[FIELD_DESIRED_CAPABILITIES] = o; + return this; + } + + public BeginFrame setProperties(Object o) + { + getFields()[FIELD_PROPERTIES] = o; + return this; + } + +} +
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/CloseFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/CloseFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/CloseFrame.java new file mode 100644 index 0000000..b513de9 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/CloseFrame.java @@ -0,0 +1,61 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class CloseFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:close:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000018L); + + + private static final int FIELD_ERROR = 0; + + public CloseFrame(Object... fields) + { + super(1); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public CloseFrame setError(Object o) + { + getFields()[FIELD_ERROR] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DetachFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DetachFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DetachFrame.java new file mode 100644 index 0000000..443e59e --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DetachFrame.java @@ -0,0 +1,75 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class DetachFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:detach:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000016L); + + + private static final int FIELD_HANDLE = 0; + private static final int FIELD_CLOSED = 1; + private static final int FIELD_ERROR = 2; + + public DetachFrame(Object... fields) + { + super(3); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public DetachFrame setHandle(Object o) + { + getFields()[FIELD_HANDLE] = o; + return this; + } + + public DetachFrame setClosed(Object o) + { + getFields()[FIELD_CLOSED] = o; + return this; + } + + public DetachFrame setError(Object o) + { + getFields()[FIELD_ERROR] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DispositionFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DispositionFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DispositionFrame.java new file mode 100644 index 0000000..385dc9d --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/DispositionFrame.java @@ -0,0 +1,96 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class DispositionFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:disposition:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000015L); + + + private static final int FIELD_ROLE = 0; + private static final int FIELD_FIRST = 1; + private static final int FIELD_LAST = 2; + private static final int FIELD_SETTLED = 3; + private static final int FIELD_STATE = 4; + private static final int FIELD_BATCHABLE = 5; + + public DispositionFrame(Object... fields) + { + super(6); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public DispositionFrame setRole(Object o) + { + getFields()[FIELD_ROLE] = o; + return this; + } + + public DispositionFrame setFirst(Object o) + { + getFields()[FIELD_FIRST] = o; + return this; + } + + public DispositionFrame setLast(Object o) + { + getFields()[FIELD_LAST] = o; + return this; + } + + public DispositionFrame setSettled(Object o) + { + getFields()[FIELD_SETTLED] = o; + return this; + } + + public DispositionFrame setState(Object o) + { + getFields()[FIELD_STATE] = o; + return this; + } + + public DispositionFrame setBatchable(Object o) + { + getFields()[FIELD_BATCHABLE] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/EndFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/EndFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/EndFrame.java new file mode 100644 index 0000000..ee54a04 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/EndFrame.java @@ -0,0 +1,61 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class EndFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:end:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000017L); + + + private static final int FIELD_ERROR = 0; + + public EndFrame(Object... fields) + { + super(1); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public EndFrame setError(Object o) + { + getFields()[FIELD_ERROR] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/FlowFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/FlowFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/FlowFrame.java new file mode 100644 index 0000000..bd4411d --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/FlowFrame.java @@ -0,0 +1,131 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class FlowFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:flow:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000013L); + + + private static final int FIELD_NEXT_INCOMING_ID = 0; + private static final int FIELD_INCOMING_WINDOW = 1; + private static final int FIELD_NEXT_OUTGOING_ID = 2; + private static final int FIELD_OUTGOING_WINDOW = 3; + private static final int FIELD_HANDLE = 4; + private static final int FIELD_DELIVERY_COUNT = 5; + private static final int FIELD_LINK_CREDIT = 6; + private static final int FIELD_AVAILABLE = 7; + private static final int FIELD_DRAIN = 8; + private static final int FIELD_ECHO = 9; + private static final int FIELD_PROPERTIES = 10; + + public FlowFrame(Object... fields) + { + super(11); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public FlowFrame setNextIncomingId(Object o) + { + getFields()[FIELD_NEXT_INCOMING_ID] = o; + return this; + } + + public FlowFrame setIncomingWindow(Object o) + { + getFields()[FIELD_INCOMING_WINDOW] = o; + return this; + } + + public FlowFrame setNextOutgoingId(Object o) + { + getFields()[FIELD_NEXT_OUTGOING_ID] = o; + return this; + } + + public FlowFrame setOutgoingWindow(Object o) + { + getFields()[FIELD_OUTGOING_WINDOW] = o; + return this; + } + + public FlowFrame setHandle(Object o) + { + getFields()[FIELD_HANDLE] = o; + return this; + } + + public FlowFrame setDeliveryCount(Object o) + { + getFields()[FIELD_DELIVERY_COUNT] = o; + return this; + } + + public FlowFrame setLinkCredit(Object o) + { + getFields()[FIELD_LINK_CREDIT] = o; + return this; + } + + public FlowFrame setAvailable(Object o) + { + getFields()[FIELD_AVAILABLE] = o; + return this; + } + + public FlowFrame setDrain(Object o) + { + getFields()[FIELD_DRAIN] = o; + return this; + } + + public FlowFrame setEcho(Object o) + { + getFields()[FIELD_ECHO] = o; + return this; + } + + public FlowFrame setProperties(Object o) + { + getFields()[FIELD_PROPERTIES] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Modified.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Modified.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Modified.java new file mode 100644 index 0000000..d934106 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Modified.java @@ -0,0 +1,75 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class Modified extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:modified:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000027L); + + + private static final int FIELD_DELIVERY_FAILED = 0; + private static final int FIELD_UNDELIVERABLE_HERE = 1; + private static final int FIELD_MESSAGE_ANNOTATIONS = 2; + + public Modified(Object... fields) + { + super(3); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public Modified setDeliveryFailed(Object o) + { + getFields()[FIELD_DELIVERY_FAILED] = o; + return this; + } + + public Modified setUndeliverableHere(Object o) + { + getFields()[FIELD_UNDELIVERABLE_HERE] = o; + return this; + } + + public Modified setMessageAnnotations(Object o) + { + getFields()[FIELD_MESSAGE_ANNOTATIONS] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/OpenFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/OpenFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/OpenFrame.java new file mode 100644 index 0000000..a89af0e --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/OpenFrame.java @@ -0,0 +1,124 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class OpenFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:open:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000010L); + + + private static final int FIELD_CONTAINER_ID = 0; + private static final int FIELD_HOSTNAME = 1; + private static final int FIELD_MAX_FRAME_SIZE = 2; + private static final int FIELD_CHANNEL_MAX = 3; + private static final int FIELD_IDLE_TIME_OUT = 4; + private static final int FIELD_OUTGOING_LOCALES = 5; + private static final int FIELD_INCOMING_LOCALES = 6; + private static final int FIELD_OFFERED_CAPABILITIES = 7; + private static final int FIELD_DESIRED_CAPABILITIES = 8; + private static final int FIELD_PROPERTIES = 9; + + public OpenFrame(Object... fields) + { + super(10); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public OpenFrame setContainerId(Object o) + { + getFields()[FIELD_CONTAINER_ID] = o; + return this; + } + + public OpenFrame setHostname(Object o) + { + getFields()[FIELD_HOSTNAME] = o; + return this; + } + + public OpenFrame setMaxFrameSize(Object o) + { + getFields()[FIELD_MAX_FRAME_SIZE] = o; + return this; + } + + public OpenFrame setChannelMax(Object o) + { + getFields()[FIELD_CHANNEL_MAX] = o; + return this; + } + + public OpenFrame setIdleTimeOut(Object o) + { + getFields()[FIELD_IDLE_TIME_OUT] = o; + return this; + } + + public OpenFrame setOutgoingLocales(Object o) + { + getFields()[FIELD_OUTGOING_LOCALES] = o; + return this; + } + + public OpenFrame setIncomingLocales(Object o) + { + getFields()[FIELD_INCOMING_LOCALES] = o; + return this; + } + + public OpenFrame setOfferedCapabilities(Object o) + { + getFields()[FIELD_OFFERED_CAPABILITIES] = o; + return this; + } + + public OpenFrame setDesiredCapabilities(Object o) + { + getFields()[FIELD_DESIRED_CAPABILITIES] = o; + return this; + } + + public OpenFrame setProperties(Object o) + { + getFields()[FIELD_PROPERTIES] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Rejected.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Rejected.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Rejected.java new file mode 100644 index 0000000..817576f --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Rejected.java @@ -0,0 +1,61 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class Rejected extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:rejected:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000025L); + + + private static final int FIELD_ERROR = 0; + + public Rejected(Object... fields) + { + super(1); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public Rejected setError(Object o) + { + getFields()[FIELD_ERROR] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Released.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Released.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Released.java new file mode 100644 index 0000000..5925265 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Released.java @@ -0,0 +1,54 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class Released extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:released:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000026L); + + + + public Released(Object... fields) + { + super(0); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslChallengeFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslChallengeFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslChallengeFrame.java new file mode 100644 index 0000000..c8033eb --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslChallengeFrame.java @@ -0,0 +1,61 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class SaslChallengeFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:sasl-challenge:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000042L); + + + private static final int FIELD_CHALLENGE = 0; + + public SaslChallengeFrame(Object... fields) + { + super(1); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public SaslChallengeFrame setChallenge(Object o) + { + getFields()[FIELD_CHALLENGE] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslInitFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslInitFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslInitFrame.java new file mode 100644 index 0000000..a11ce3d --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslInitFrame.java @@ -0,0 +1,75 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class SaslInitFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:sasl-init:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000041L); + + + private static final int FIELD_MECHANISM = 0; + private static final int FIELD_INITIAL_RESPONSE = 1; + private static final int FIELD_HOSTNAME = 2; + + public SaslInitFrame(Object... fields) + { + super(3); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public SaslInitFrame setMechanism(Object o) + { + getFields()[FIELD_MECHANISM] = o; + return this; + } + + public SaslInitFrame setInitialResponse(Object o) + { + getFields()[FIELD_INITIAL_RESPONSE] = o; + return this; + } + + public SaslInitFrame setHostname(Object o) + { + getFields()[FIELD_HOSTNAME] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslMechanismsFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslMechanismsFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslMechanismsFrame.java new file mode 100644 index 0000000..40bf99d --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslMechanismsFrame.java @@ -0,0 +1,61 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class SaslMechanismsFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:sasl-mechanisms:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000040L); + + + private static final int FIELD_SASL_SERVER_MECHANISMS = 0; + + public SaslMechanismsFrame(Object... fields) + { + super(1); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public SaslMechanismsFrame setSaslServerMechanisms(Object o) + { + getFields()[FIELD_SASL_SERVER_MECHANISMS] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslOutcomeFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslOutcomeFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslOutcomeFrame.java new file mode 100644 index 0000000..27da943 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslOutcomeFrame.java @@ -0,0 +1,68 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class SaslOutcomeFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:sasl-outcome:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000044L); + + + private static final int FIELD_CODE = 0; + private static final int FIELD_ADDITIONAL_DATA = 1; + + public SaslOutcomeFrame(Object... fields) + { + super(2); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public SaslOutcomeFrame setCode(Object o) + { + getFields()[FIELD_CODE] = o; + return this; + } + + public SaslOutcomeFrame setAdditionalData(Object o) + { + getFields()[FIELD_ADDITIONAL_DATA] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslResponseFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslResponseFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslResponseFrame.java new file mode 100644 index 0000000..94e6094 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/SaslResponseFrame.java @@ -0,0 +1,61 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class SaslResponseFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:sasl-response:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000043L); + + + private static final int FIELD_RESPONSE = 0; + + public SaslResponseFrame(Object... fields) + { + super(1); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public SaslResponseFrame setResponse(Object o) + { + getFields()[FIELD_RESPONSE] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Source.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Source.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Source.java new file mode 100644 index 0000000..a2b0683 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Source.java @@ -0,0 +1,131 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class Source extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:source:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000028L); + + + private static final int FIELD_ADDRESS = 0; + private static final int FIELD_DURABLE = 1; + private static final int FIELD_EXPIRY_POLICY = 2; + private static final int FIELD_TIMEOUT = 3; + private static final int FIELD_DYNAMIC = 4; + private static final int FIELD_DYNAMIC_NODE_PROPERTIES = 5; + private static final int FIELD_DISTRIBUTION_MODE = 6; + private static final int FIELD_FILTER = 7; + private static final int FIELD_DEFAULT_OUTCOME = 8; + private static final int FIELD_OUTCOMES = 9; + private static final int FIELD_CAPABILITIES = 10; + + public Source(Object... fields) + { + super(11); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public Source setAddress(Object o) + { + getFields()[FIELD_ADDRESS] = o; + return this; + } + + public Source setDurable(Object o) + { + getFields()[FIELD_DURABLE] = o; + return this; + } + + public Source setExpiryPolicy(Object o) + { + getFields()[FIELD_EXPIRY_POLICY] = o; + return this; + } + + public Source setTimeout(Object o) + { + getFields()[FIELD_TIMEOUT] = o; + return this; + } + + public Source setDynamic(Object o) + { + getFields()[FIELD_DYNAMIC] = o; + return this; + } + + public Source setDynamicNodeProperties(Object o) + { + getFields()[FIELD_DYNAMIC_NODE_PROPERTIES] = o; + return this; + } + + public Source setDistributionMode(Object o) + { + getFields()[FIELD_DISTRIBUTION_MODE] = o; + return this; + } + + public Source setFilter(Object o) + { + getFields()[FIELD_FILTER] = o; + return this; + } + + public Source setDefaultOutcome(Object o) + { + getFields()[FIELD_DEFAULT_OUTCOME] = o; + return this; + } + + public Source setOutcomes(Object o) + { + getFields()[FIELD_OUTCOMES] = o; + return this; + } + + public Source setCapabilities(Object o) + { + getFields()[FIELD_CAPABILITIES] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Target.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Target.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Target.java new file mode 100644 index 0000000..47ccfa0 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/Target.java @@ -0,0 +1,103 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class Target extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:target:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000029L); + + + private static final int FIELD_ADDRESS = 0; + private static final int FIELD_DURABLE = 1; + private static final int FIELD_EXPIRY_POLICY = 2; + private static final int FIELD_TIMEOUT = 3; + private static final int FIELD_DYNAMIC = 4; + private static final int FIELD_DYNAMIC_NODE_PROPERTIES = 5; + private static final int FIELD_CAPABILITIES = 6; + + public Target(Object... fields) + { + super(7); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public Target setAddress(Object o) + { + getFields()[FIELD_ADDRESS] = o; + return this; + } + + public Target setDurable(Object o) + { + getFields()[FIELD_DURABLE] = o; + return this; + } + + public Target setExpiryPolicy(Object o) + { + getFields()[FIELD_EXPIRY_POLICY] = o; + return this; + } + + public Target setTimeout(Object o) + { + getFields()[FIELD_TIMEOUT] = o; + return this; + } + + public Target setDynamic(Object o) + { + getFields()[FIELD_DYNAMIC] = o; + return this; + } + + public Target setDynamicNodeProperties(Object o) + { + getFields()[FIELD_DYNAMIC_NODE_PROPERTIES] = o; + return this; + } + + public Target setCapabilities(Object o) + { + getFields()[FIELD_CAPABILITIES] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/TransferFrame.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/TransferFrame.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/TransferFrame.java new file mode 100644 index 0000000..e1f4435 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/TransferFrame.java @@ -0,0 +1,131 @@ +/* + * 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.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class TransferFrame extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:transfer:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000014L); + + + private static final int FIELD_HANDLE = 0; + private static final int FIELD_DELIVERY_ID = 1; + private static final int FIELD_DELIVERY_TAG = 2; + private static final int FIELD_MESSAGE_FORMAT = 3; + private static final int FIELD_SETTLED = 4; + private static final int FIELD_MORE = 5; + private static final int FIELD_RCV_SETTLE_MODE = 6; + private static final int FIELD_STATE = 7; + private static final int FIELD_RESUME = 8; + private static final int FIELD_ABORTED = 9; + private static final int FIELD_BATCHABLE = 10; + + public TransferFrame(Object... fields) + { + super(11); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public TransferFrame setHandle(Object o) + { + getFields()[FIELD_HANDLE] = o; + return this; + } + + public TransferFrame setDeliveryId(Object o) + { + getFields()[FIELD_DELIVERY_ID] = o; + return this; + } + + public TransferFrame setDeliveryTag(Object o) + { + getFields()[FIELD_DELIVERY_TAG] = o; + return this; + } + + public TransferFrame setMessageFormat(Object o) + { + getFields()[FIELD_MESSAGE_FORMAT] = o; + return this; + } + + public TransferFrame setSettled(Object o) + { + getFields()[FIELD_SETTLED] = o; + return this; + } + + public TransferFrame setMore(Object o) + { + getFields()[FIELD_MORE] = o; + return this; + } + + public TransferFrame setRcvSettleMode(Object o) + { + getFields()[FIELD_RCV_SETTLE_MODE] = o; + return this; + } + + public TransferFrame setState(Object o) + { + getFields()[FIELD_STATE] = o; + return this; + } + + public TransferFrame setResume(Object o) + { + getFields()[FIELD_RESUME] = o; + return this; + } + + public TransferFrame setAborted(Object o) + { + getFields()[FIELD_ABORTED] = o; + return this; + } + + public TransferFrame setBatchable(Object o) + { + getFields()[FIELD_BATCHABLE] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/generate-frames.xsl ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/generate-frames.xsl b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/generate-frames.xsl new file mode 100644 index 0000000..75e3b65 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/generate-frames.xsl @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:exsl="http://exslt.org/common" + extension-element-prefixes="exsl"> + +<!-- Used to generate the Java classes in this package. + Changes to these classes should be effected by modifying this stylesheet then re-running it, + using a stylesheet processor that understands the exsl directives such as xsltproc --> + +<xsl:template match="/"> + <xsl:variable name="license">/* + * 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. + * + */ +</xsl:variable> + + <xsl:for-each select="descendant-or-self::node()[name()='type']"> + + <xsl:if test="@provides = 'frame' or @provides = 'sasl-frame'"> + <xsl:variable name="classname"><xsl:call-template name="dashToCamel"><xsl:with-param name="input" select="@name"/></xsl:call-template>Frame</xsl:variable> + + <xsl:call-template name="typeClass"> + <xsl:with-param name="license" select="$license"/> + <xsl:with-param name="classname" select="$classname"/> + </xsl:call-template> + </xsl:if> + + <xsl:if test="@provides = 'delivery-state, outcome' or @provides = 'source' or @provides = 'target'"> + <xsl:variable name="classname"><xsl:call-template name="dashToCamel"><xsl:with-param name="input" select="@name"/></xsl:call-template></xsl:variable> + + <xsl:call-template name="typeClass"> + <xsl:with-param name="license" select="$license"/> + <xsl:with-param name="classname" select="$classname"/> + </xsl:call-template> + </xsl:if> + </xsl:for-each> +</xsl:template> + + +<!-- *************************************************************************************************************** --> + +<xsl:template name="typeClass"> + <xsl:param name="license"/> + <xsl:param name="classname"/> + <exsl:document href="{$classname}.java" method="text"> + <xsl:value-of select="$license"/> +package org.apache.qpid.jms.test.testpeer.describedtypes; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-frames.xsl, which resides in this package. + */ +public class <xsl:value-of select="$classname"/> extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("<xsl:value-of select="descendant::node()[name()='descriptor']/@name"/>"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(<xsl:value-of select="concat(substring(descendant::node()[name()='descriptor']/@code,1,10),substring(descendant::node()[name()='descriptor']/@code,14))"/>L); + +<xsl:for-each select="descendant::node()[name()='field']"> + private static final int FIELD_<xsl:call-template name="toUpperDashToUnderscore"><xsl:with-param name="input" select="@name"/></xsl:call-template> = <xsl:value-of select="count(preceding-sibling::node()[name()='field'])"/>;</xsl:for-each> + + public <xsl:value-of select="$classname"/>(Object... fields) + { + super(<xsl:value-of select="count(descendant::node()[name()='field'])"/>); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } +<xsl:for-each select="descendant::node()[name()='field']"> + public <xsl:value-of select="$classname"/> set<xsl:call-template name="dashToCamel"><xsl:with-param name="input" select="@name"/></xsl:call-template>(Object o) + { + getFields()[FIELD_<xsl:call-template name="toUpperDashToUnderscore"><xsl:with-param name="input" select="@name"/></xsl:call-template>] = o; + return this; + } +</xsl:for-each> +} + +</exsl:document> + +</xsl:template> + +<!-- *************************************************************************************************************** --> + +<xsl:template name="constructFromLiteral"> + <xsl:param name="type"/> + <xsl:param name="value"/> + <xsl:choose> + <xsl:when test="$type = 'string'">"<xsl:value-of select="$value"/></xsl:when> + <xsl:when test="$type = 'symbol'">Symbol.valueOf("<xsl:value-of select="$value"/>")</xsl:when> + <xsl:when test="$type = 'ubyte'">UnsignedByte.valueOf((byte) <xsl:value-of select="$value"/>)</xsl:when> + <xsl:when test="$type = 'ushort'">UnsignedShort.valueOf((short) <xsl:value-of select="$value"/>)</xsl:when> + <xsl:when test="$type = 'uint'">UnsignedInteger.valueOf(<xsl:value-of select="$value"/>)</xsl:when> + <xsl:when test="$type = 'ulong'">UnsignedLong.valueOf(<xsl:value-of select="$value"/>L)</xsl:when> + <xsl:when test="$type = 'long'"><xsl:value-of select="$value"/>L</xsl:when> + <xsl:when test="$type = 'short'">(short)<xsl:value-of select="$value"/></xsl:when> + <xsl:when test="$type = 'short'">(byte)<xsl:value-of select="$value"/></xsl:when> + <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- *************************************************************************************************************** --> +<xsl:template name="substringAfterLast"><xsl:param name="input"/><xsl:param name="arg"/> + <xsl:choose> + <xsl:when test="contains($input,$arg)"><xsl:call-template name="substringAfterLast"><xsl:with-param name="input"><xsl:value-of select="substring-after($input,$arg)"/></xsl:with-param><xsl:with-param name="arg"><xsl:value-of select="$arg"/></xsl:with-param></xsl:call-template></xsl:when> + <xsl:otherwise><xsl:value-of select="$input"/></xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="initCap"><xsl:param name="input"/><xsl:value-of select="translate(substring($input,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:value-of select="substring($input,2)"/></xsl:template> + + <xsl:template name="initLower"><xsl:param name="input"/><xsl:value-of select="translate(substring($input,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/><xsl:value-of select="substring($input,2)"/></xsl:template> + + <xsl:template name="toUpper"><xsl:param name="input"/><xsl:value-of select="translate($input,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:template> + + <xsl:template name="toUpperDashToUnderscore"><xsl:param name="input"/><xsl:value-of select="translate($input,'abcdefghijklmnopqrstuvwxyz-','ABCDEFGHIJKLMNOPQRSTUVWXYZ_')"/></xsl:template> + + <xsl:template name="dashToCamel"> + <xsl:param name="input"/> + <xsl:choose> + <xsl:when test="contains($input,'-')"><xsl:call-template name="initCap"><xsl:with-param name="input" select="substring-before($input,'-')"/></xsl:call-template><xsl:call-template name="dashToCamel"><xsl:with-param name="input" select="substring-after($input,'-')"/></xsl:call-template></xsl:when> + <xsl:otherwise><xsl:call-template name="initCap"><xsl:with-param name="input" select="$input"/></xsl:call-template></xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="dashToLowerCamel"> + <xsl:param name="input"/> + <xsl:call-template name="initLower"><xsl:with-param name="input"><xsl:call-template name="dashToCamel"><xsl:with-param name="input" select="$input"/></xsl:call-template></xsl:with-param></xsl:call-template> + </xsl:template> +</xsl:stylesheet> http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/AmqpValueDescribedType.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/AmqpValueDescribedType.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/AmqpValueDescribedType.java new file mode 100644 index 0000000..d524b46 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/AmqpValueDescribedType.java @@ -0,0 +1,48 @@ +/* + * + * 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.jms.test.testpeer.describedtypes.sections; + +import org.apache.qpid.proton.amqp.DescribedType; +import org.apache.qpid.proton.amqp.Symbol; + +public class AmqpValueDescribedType implements DescribedType +{ + private static final Symbol DESCIPTOR_SYMBOL = Symbol.valueOf("amqp:amqp-value:*"); + private Object _described; + + public AmqpValueDescribedType(Object described) + { + _described = described; + } + + @Override + public Object getDescriptor() + { + return DESCIPTOR_SYMBOL; + } + + @Override + public Object getDescribed() + { + return _described; + } + +} http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/ApplicationPropertiesDescribedType.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/ApplicationPropertiesDescribedType.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/ApplicationPropertiesDescribedType.java new file mode 100644 index 0000000..12f92a5 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/ApplicationPropertiesDescribedType.java @@ -0,0 +1,45 @@ +/* + * + * 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.jms.test.testpeer.describedtypes.sections; + +import org.apache.qpid.jms.test.testpeer.MapDescribedType; +import org.apache.qpid.proton.amqp.Symbol; + +public class ApplicationPropertiesDescribedType extends MapDescribedType +{ + private static final Symbol DESCIPTOR_SYMBOL = Symbol.valueOf("amqp:application-properties:map"); + + @Override + public Object getDescriptor() + { + return DESCIPTOR_SYMBOL; + } + + public void setApplicationProperty(String name, Object value) + { + if(name == null) + { + throw new RuntimeException("ApplicationProperties maps must use non-null String keys"); + } + + getDescribed().put(name, value); + } +} http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/DataDescribedType.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/DataDescribedType.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/DataDescribedType.java new file mode 100644 index 0000000..7205c9f --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/DataDescribedType.java @@ -0,0 +1,54 @@ +/* + * + * 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.jms.test.testpeer.describedtypes.sections; + +import org.apache.qpid.proton.amqp.Binary; +import org.apache.qpid.proton.amqp.DescribedType; +import org.apache.qpid.proton.amqp.Symbol; + +public class DataDescribedType implements DescribedType +{ + private static final Symbol DESCIPTOR_SYMBOL = Symbol.valueOf("amqp:data:binary"); + private Binary _described; + + public DataDescribedType(Binary described) + { + if(described == null) + { + throw new IllegalArgumentException("provided Binary must not be null"); + } + + _described = described; + } + + @Override + public Object getDescriptor() + { + return DESCIPTOR_SYMBOL; + } + + @Override + public Object getDescribed() + { + return _described; + } + +} http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/HeaderDescribedType.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/HeaderDescribedType.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/HeaderDescribedType.java new file mode 100644 index 0000000..ed7cb57 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/HeaderDescribedType.java @@ -0,0 +1,89 @@ +/* + * 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.jms.test.testpeer.describedtypes.sections; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-list-sections.xsl, which resides in this package. + */ +public class HeaderDescribedType extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:header:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000070L); + + + private static final int FIELD_DURABLE = 0; + private static final int FIELD_PRIORITY = 1; + private static final int FIELD_TTL = 2; + private static final int FIELD_FIRST_ACQUIRER = 3; + private static final int FIELD_DELIVERY_COUNT = 4; + + public HeaderDescribedType(Object... fields) + { + super(5); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public HeaderDescribedType setDurable(Object o) + { + getFields()[FIELD_DURABLE] = o; + return this; + } + + public HeaderDescribedType setPriority(Object o) + { + getFields()[FIELD_PRIORITY] = o; + return this; + } + + public HeaderDescribedType setTtl(Object o) + { + getFields()[FIELD_TTL] = o; + return this; + } + + public HeaderDescribedType setFirstAcquirer(Object o) + { + getFields()[FIELD_FIRST_ACQUIRER] = o; + return this; + } + + public HeaderDescribedType setDeliveryCount(Object o) + { + getFields()[FIELD_DELIVERY_COUNT] = o; + return this; + } + +} + http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/MessageAnnotationsDescribedType.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/MessageAnnotationsDescribedType.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/MessageAnnotationsDescribedType.java new file mode 100644 index 0000000..93a45b2 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/MessageAnnotationsDescribedType.java @@ -0,0 +1,46 @@ +/* + * + * 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.jms.test.testpeer.describedtypes.sections; + +import org.apache.qpid.jms.test.testpeer.MapDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +public class MessageAnnotationsDescribedType extends MapDescribedType +{ + private static final Symbol DESCIPTOR_SYMBOL = Symbol.valueOf("amqp:message-annotations:map"); + + @Override + public Object getDescriptor() + { + return DESCIPTOR_SYMBOL; + } + + public void setSymbolKeyedAnnotation(String name, Object value) + { + getDescribed().put(Symbol.valueOf(name), value); + } + + public void setUnsignedLongKeyedAnnotation(UnsignedLong name, Object value) + { + throw new UnsupportedOperationException("UnsignedLong keys are currently reserved"); + } +} http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/e4decdc1/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/PropertiesDescribedType.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/PropertiesDescribedType.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/PropertiesDescribedType.java new file mode 100644 index 0000000..716fc39 --- /dev/null +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/describedtypes/sections/PropertiesDescribedType.java @@ -0,0 +1,145 @@ +/* + * 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.jms.test.testpeer.describedtypes.sections; + +import org.apache.qpid.jms.test.testpeer.ListDescribedType; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.UnsignedLong; + +/** + * Generated by generate-list-sections.xsl, which resides in this package. + */ +public class PropertiesDescribedType extends ListDescribedType +{ + public static final Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:properties:list"); + public static final UnsignedLong DESCRIPTOR_CODE = UnsignedLong.valueOf(0x0000000000000073L); + + + private static final int FIELD_MESSAGE_ID = 0; + private static final int FIELD_USER_ID = 1; + private static final int FIELD_TO = 2; + private static final int FIELD_SUBJECT = 3; + private static final int FIELD_REPLY_TO = 4; + private static final int FIELD_CORRELATION_ID = 5; + private static final int FIELD_CONTENT_TYPE = 6; + private static final int FIELD_CONTENT_ENCODING = 7; + private static final int FIELD_ABSOLUTE_EXPIRY_TIME = 8; + private static final int FIELD_CREATION_TIME = 9; + private static final int FIELD_GROUP_ID = 10; + private static final int FIELD_GROUP_SEQUENCE = 11; + private static final int FIELD_REPLY_TO_GROUP_ID = 12; + + public PropertiesDescribedType(Object... fields) + { + super(13); + int i = 0; + for(Object field : fields) + { + getFields()[i++] = field; + } + } + + @Override + public Symbol getDescriptor() + { + return DESCRIPTOR_SYMBOL; + } + + public PropertiesDescribedType setMessageId(Object o) + { + getFields()[FIELD_MESSAGE_ID] = o; + return this; + } + + public PropertiesDescribedType setUserId(Object o) + { + getFields()[FIELD_USER_ID] = o; + return this; + } + + public PropertiesDescribedType setTo(Object o) + { + getFields()[FIELD_TO] = o; + return this; + } + + public PropertiesDescribedType setSubject(Object o) + { + getFields()[FIELD_SUBJECT] = o; + return this; + } + + public PropertiesDescribedType setReplyTo(Object o) + { + getFields()[FIELD_REPLY_TO] = o; + return this; + } + + public PropertiesDescribedType setCorrelationId(Object o) + { + getFields()[FIELD_CORRELATION_ID] = o; + return this; + } + + public PropertiesDescribedType setContentType(Object o) + { + getFields()[FIELD_CONTENT_TYPE] = o; + return this; + } + + public PropertiesDescribedType setContentEncoding(Object o) + { + getFields()[FIELD_CONTENT_ENCODING] = o; + return this; + } + + public PropertiesDescribedType setAbsoluteExpiryTime(Object o) + { + getFields()[FIELD_ABSOLUTE_EXPIRY_TIME] = o; + return this; + } + + public PropertiesDescribedType setCreationTime(Object o) + { + getFields()[FIELD_CREATION_TIME] = o; + return this; + } + + public PropertiesDescribedType setGroupId(Object o) + { + getFields()[FIELD_GROUP_ID] = o; + return this; + } + + public PropertiesDescribedType setGroupSequence(Object o) + { + getFields()[FIELD_GROUP_SEQUENCE] = o; + return this; + } + + public PropertiesDescribedType setReplyToGroupId(Object o) + { + getFields()[FIELD_REPLY_TO_GROUP_ID] = o; + return this; + } + +} + --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
