summaryrefslogtreecommitdiff
path: root/java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java')
-rw-r--r--java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java87
1 files changed, 81 insertions, 6 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java b/java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java
index ebcdc2cf4d..6fcde5f96e 100644
--- a/java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java
+++ b/java/common/src/main/java/org/apache/qpid/framing/ConnectionSecureBody.java
@@ -22,15 +22,90 @@
/*
* This file is auto-generated by Qpid Gentools v.0.1 - do not modify.
* Supported AMQP version:
- * 0-9
- * 0-91
- * 8-0
- */
+ * 8-0
+ */
package org.apache.qpid.framing;
-public interface ConnectionSecureBody extends EncodableAMQDataBlock, AMQMethodBody
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.codec.MarkableDataInput;
+
+public class ConnectionSecureBody extends AMQMethodBodyImpl implements EncodableAMQDataBlock, AMQMethodBody
{
+ private static final AMQMethodBodyInstanceFactory FACTORY_INSTANCE = new AMQMethodBodyInstanceFactory()
+ {
+ public AMQMethodBody newInstance(MarkableDataInput in, long size) throws AMQFrameDecodingException, IOException
+ {
+ return new ConnectionSecureBody(in);
+ }
+ };
+
+ public static AMQMethodBodyInstanceFactory getFactory()
+ {
+ return FACTORY_INSTANCE;
+ }
+
+ public static final int CLASS_ID = 10;
+ public static final int METHOD_ID = 20;
+
+ // Fields declared in specification
+ private final byte[] _challenge; // [challenge]
+
+ // Constructor
+ public ConnectionSecureBody(MarkableDataInput buffer) throws AMQFrameDecodingException, IOException
+ {
+ _challenge = readBytes( buffer );
+ }
+
+ public ConnectionSecureBody(
+ byte[] challenge
+ )
+ {
+ _challenge = challenge;
+ }
+
+ public int getClazz()
+ {
+ return CLASS_ID;
+ }
+
+ public int getMethod()
+ {
+ return METHOD_ID;
+ }
+
+ public final byte[] getChallenge()
+ {
+ return _challenge;
+ }
+
+ protected int getBodySize()
+ {
+ int size = 0;
+ size += getSizeOf( _challenge );
+ return size;
+ }
+
+ public void writeMethodPayload(DataOutput buffer) throws IOException
+ {
+ writeBytes( buffer, _challenge );
+ }
+
+ public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException
+ {
+ return dispatcher.dispatchConnectionSecure(this, channelId);
+ }
+
+ public String toString()
+ {
+ StringBuilder buf = new StringBuilder("[ConnectionSecureBodyImpl: ");
+ buf.append( "challenge=" );
+ buf.append( getChallenge() == null ? "null" : java.util.Arrays.toString( getChallenge() ) );
+ buf.append("]");
+ return buf.toString();
+ }
- public byte[] getChallenge();
}