org.apache.qpid.framing
Class ContentHeaderBody

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

public class ContentHeaderBody
extends Object
implements AMQBody


Field Summary
 long bodySize
          unsigned long but java can't handle that anyway when allocating byte array
 int classId
           
 ContentHeaderProperties properties
          must never be null
static byte TYPE
           
 int weight
           
 
Constructor Summary
ContentHeaderBody()
           
ContentHeaderBody(org.apache.mina.common.ByteBuffer buffer, long size)
           
ContentHeaderBody(ContentHeaderProperties props, int classId)
           
ContentHeaderBody(int classId, int weight, ContentHeaderProperties props, long bodySize)
           
 
Method Summary
static AMQFrame createAMQFrame(int channelId, ContentHeaderBody body)
           
static AMQFrame createAMQFrame(int channelId, int classId, int weight, BasicContentHeaderProperties properties, long bodySize)
           
static ContentHeaderBody createFromBuffer(org.apache.mina.common.ByteBuffer buffer, long size)
          Helper method that is used currently by the persistence layer (by BDB at the moment).
 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 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

classId

public int classId

weight

public int weight

bodySize

public long bodySize
unsigned long but java can't handle that anyway when allocating byte array


properties

public ContentHeaderProperties properties
must never be null

Constructor Detail

ContentHeaderBody

public ContentHeaderBody()

ContentHeaderBody

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

ContentHeaderBody

public ContentHeaderBody(ContentHeaderProperties props,
                         int classId)

ContentHeaderBody

public ContentHeaderBody(int classId,
                         int weight,
                         ContentHeaderProperties props,
                         long bodySize)
Method Detail

getFrameType

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

populateFromBuffer

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

createFromBuffer

public static ContentHeaderBody createFromBuffer(org.apache.mina.common.ByteBuffer buffer,
                                                 long size)
                                          throws AMQFrameDecodingException,
                                                 AMQProtocolVersionException
Helper method that is used currently by the persistence layer (by BDB at the moment).

Parameters:
buffer -
size -
Returns:
Throws:
AMQFrameDecodingException
AMQProtocolVersionException

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

createAMQFrame

public static AMQFrame createAMQFrame(int channelId,
                                      int classId,
                                      int weight,
                                      BasicContentHeaderProperties properties,
                                      long bodySize)

createAMQFrame

public static AMQFrame createAMQFrame(int channelId,
                                      ContentHeaderBody body)


Licensed to the Apache Software Foundation