org.apache.qpid.framing
Class ContentBody

java.lang.Object
  extended by org.apache.qpid.framing.ContentBody
All Implemented Interfaces:
AMQBody

public class ContentBody
extends Object
implements AMQBody


Field Summary
 org.apache.mina.common.ByteBuffer payload
           
static byte TYPE
           
 
Constructor Summary
ContentBody()
           
ContentBody(org.apache.mina.common.ByteBuffer payload)
           
ContentBody(org.apache.mina.common.ByteBuffer buffer, long size)
           
 
Method Summary
static AMQFrame createAMQFrame(int channelId, ContentBody body)
           
 byte getFrameType()
           
 int getSize()
          Get the size of the body
 void handle(int channelId, AMQVersionAwareProtocolSession session)
           
protected  void populateFromBuffer(org.apache.mina.common.ByteBuffer buffer, long size)
           
 void reduceBufferToFit()
           
 void writePayload(org.apache.mina.common.ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final byte TYPE
See Also:
Constant Field Values

payload

public org.apache.mina.common.ByteBuffer payload
Constructor Detail

ContentBody

public ContentBody()

ContentBody

public ContentBody(org.apache.mina.common.ByteBuffer buffer,
                   long size)
            throws AMQFrameDecodingException
Throws:
AMQFrameDecodingException

ContentBody

public ContentBody(org.apache.mina.common.ByteBuffer payload)
Method Detail

getFrameType

public byte getFrameType()
Specified by:
getFrameType in interface AMQBody

getSize

public int getSize()
Description copied from interface: AMQBody
Get the size of the body

Specified by:
getSize in interface AMQBody
Returns:
unsigned short

writePayload

public void writePayload(org.apache.mina.common.ByteBuffer buffer)
Specified by:
writePayload in interface AMQBody

handle

public void handle(int channelId,
                   AMQVersionAwareProtocolSession session)
            throws AMQException
Specified by:
handle in interface AMQBody
Throws:
AMQException

populateFromBuffer

protected void populateFromBuffer(org.apache.mina.common.ByteBuffer buffer,
                                  long size)
                           throws AMQFrameDecodingException
Throws:
AMQFrameDecodingException

reduceBufferToFit

public void reduceBufferToFit()

createAMQFrame

public static AMQFrame createAMQFrame(int channelId,
                                      ContentBody body)


Licensed to the Apache Software Foundation