diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2007-01-18 17:56:44 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2007-01-18 17:56:44 +0000 |
| commit | 5b6ca65abd333e0ea15790ec351bfb67a7013a5e (patch) | |
| tree | 86332583cc0be84981bde900cdac825865599392 /gentools/templ.java | |
| parent | 7a26e1d6aa0018e44120bef39903c4ce55676141 (diff) | |
| download | qpid-python-5b6ca65abd333e0ea15790ec351bfb67a7013a5e.tar.gz | |
made message-transfer return a result, switched over message delivery to use message-transfer, added a generated .copy() to method bodies, and made hello-world acknowledge the message it sends to itself
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'gentools/templ.java')
| -rw-r--r-- | gentools/templ.java/MethodBodyClass.tmpl | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/gentools/templ.java/MethodBodyClass.tmpl b/gentools/templ.java/MethodBodyClass.tmpl index 13fd750131..4693232b26 100644 --- a/gentools/templ.java/MethodBodyClass.tmpl +++ b/gentools/templ.java/MethodBodyClass.tmpl @@ -8,9 +8,9 @@ * 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 @@ -25,7 +25,7 @@ * Supported AMQP versions: %{VLIST} * ${major}-${minor} */ - + package org.apache.qpid.framing; import java.util.TreeMap; @@ -36,13 +36,13 @@ public class ${CLASS}${METHOD}Body extends AMQMethodBody implements EncodableAMQ { public static final TreeMap<String, Integer> classIdMap = new TreeMap<String, Integer>(); public static final TreeMap<String, Integer> methodIdMap = new TreeMap<String, Integer>(); - + static { ${CLASS_ID_INIT} ${METHOD_ID_INIT} } - + // Fields declared in specification %{FLIST} ${field_declaration} @@ -56,15 +56,15 @@ ${METHOD_ID_INIT} public int getMethod() { return methodIdMap.get(major + "-" + minor); } public static int getClazz(byte major, byte minor) { return classIdMap.get(major + "-" + minor); } public static int getMethod(byte major, byte minor) { return methodIdMap.get(major + "-" + minor); } - - // Field methods + + // Field methods %{FLIST} ${mb_field_get_method} public int getBodySize() - { + { int size = 0; %{FLIST} ${mb_field_size} - return size; + return size; } protected void writeMethodPayload(ByteBuffer buffer) @@ -90,7 +90,15 @@ ${METHOD_ID_INIT} { ${CLASS}${METHOD}Body bodyFrame = new ${CLASS}${METHOD}Body(major, minor); %{FLIST} ${mb_field_body_initialize} - + + return bodyFrame; + } + + public ${CLASS}${METHOD}Body copy() + { + ${CLASS}${METHOD}Body bodyFrame = new ${CLASS}${METHOD}Body(major, minor); +%{FLIST} ${mb_field_body_initialize} + return bodyFrame; } } |
