diff options
Diffstat (limited to 'java/common/src/main/java/org/apache/qpid/framing/ChannelFlowOkBody.java')
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/framing/ChannelFlowOkBody.java | 91 |
1 files changed, 85 insertions, 6 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/framing/ChannelFlowOkBody.java b/java/common/src/main/java/org/apache/qpid/framing/ChannelFlowOkBody.java index 750156ea9c..c2bc6619c7 100644 --- a/java/common/src/main/java/org/apache/qpid/framing/ChannelFlowOkBody.java +++ b/java/common/src/main/java/org/apache/qpid/framing/ChannelFlowOkBody.java @@ -22,15 +22,94 @@ /* * 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 ChannelFlowOkBody extends EncodableAMQDataBlock, AMQMethodBody +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.qpid.AMQException; +import org.apache.qpid.codec.MarkableDataInput; + +public class ChannelFlowOkBody 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 ChannelFlowOkBody(in); + } + }; + + public static AMQMethodBodyInstanceFactory getFactory() + { + return FACTORY_INSTANCE; + } + + public static final int CLASS_ID = 20; + public static final int METHOD_ID = 21; + + // Fields declared in specification + private final byte _bitfield0; // [active] + + // Constructor + public ChannelFlowOkBody(MarkableDataInput buffer) throws AMQFrameDecodingException, IOException + { + _bitfield0 = readBitfield( buffer ); + } + + public ChannelFlowOkBody( + boolean active + ) + { + byte bitfield0 = (byte)0; + if( active ) + { + bitfield0 = (byte) (((int) bitfield0) | (1 << 0)); + } + _bitfield0 = bitfield0; + } + + public int getClazz() + { + return CLASS_ID; + } + + public int getMethod() + { + return METHOD_ID; + } + + public final boolean getActive() + { + return (((int)(_bitfield0)) & ( 1 << 0)) != 0; + } + + protected int getBodySize() + { + int size = 1; + return size; + } + + public void writeMethodPayload(DataOutput buffer) throws IOException + { + writeBitfield( buffer, _bitfield0 ); + } + + public boolean execute(MethodDispatcher dispatcher, int channelId) throws AMQException + { + return dispatcher.dispatchChannelFlowOk(this, channelId); + } + + public String toString() + { + StringBuilder buf = new StringBuilder("[ChannelFlowOkBodyImpl: "); + buf.append( "active=" ); + buf.append( getActive() ); + buf.append("]"); + return buf.toString(); + } - public boolean getActive(); } |