Class ContentHeaderBody
- java.lang.Object
-
- org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody
-
-
Constructor Summary
Constructors Constructor Description ContentHeaderBody(QpidByteBuffer buffer, long size)ContentHeaderBody(BasicContentHeaderProperties props)ContentHeaderBody(BasicContentHeaderProperties props, long bodySize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearEncodedForm()static AMQFramecreateAMQFrame(int channelId, BasicContentHeaderProperties properties, long bodySize)static ContentHeaderBodycreateFromBuffer(QpidByteBuffer buffer, long size)Helper method that is used currently by the persistence layer.voiddispose()longgetBodySize()unsigned long but java can't handle that anyway when allocating byte arrayintgetClassId()bytegetFrameType()BasicContentHeaderPropertiesgetProperties()intgetSize()Get the size of the bodyintgetWeight()voidhandle(int channelId, AMQVersionAwareProtocolSession session)static voidprocess(QpidByteBuffer buffer, ChannelMethodProcessor methodProcessor, long size)voidreallocate()voidsetBodySize(long bodySize)StringtoString()longwritePayload(QpidByteBuffer buf)longwritePayload(ByteBufferSender sender)
-
-
-
Field Detail
-
TYPE
public static final byte TYPE
- See Also:
- Constant Field Values
-
CLASS_ID
public static final int CLASS_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ContentHeaderBody
public ContentHeaderBody(QpidByteBuffer buffer, long size) throws AMQFrameDecodingException
- Throws:
AMQFrameDecodingException
-
ContentHeaderBody
public ContentHeaderBody(BasicContentHeaderProperties props)
-
ContentHeaderBody
public ContentHeaderBody(BasicContentHeaderProperties props, long bodySize)
-
-
Method Detail
-
getFrameType
public byte getFrameType()
- Specified by:
getFrameTypein interfaceAMQBody
-
createFromBuffer
public static ContentHeaderBody createFromBuffer(QpidByteBuffer buffer, long size) throws AMQFrameDecodingException, AMQProtocolVersionException
Helper method that is used currently by the persistence layer.- Parameters:
buffer- buffer to decodesize- size of the body- Returns:
- the decoded header body
- Throws:
AMQFrameDecodingException- if there is a decoding issueAMQProtocolVersionException- if there is a version issue
-
getSize
public int getSize()
Description copied from interface:AMQBodyGet the size of the body
-
writePayload
public long writePayload(ByteBufferSender sender)
- Specified by:
writePayloadin interfaceAMQBody
-
writePayload
public long writePayload(QpidByteBuffer buf)
-
handle
public void handle(int channelId, AMQVersionAwareProtocolSession session) throws QpidException- Specified by:
handlein interfaceAMQBody- Throws:
QpidException
-
createAMQFrame
public static AMQFrame createAMQFrame(int channelId, BasicContentHeaderProperties properties, long bodySize)
-
getProperties
public BasicContentHeaderProperties getProperties()
-
getClassId
public int getClassId()
-
getWeight
public int getWeight()
-
getBodySize
public long getBodySize()
unsigned long but java can't handle that anyway when allocating byte array- Returns:
- the body size
-
setBodySize
public void setBodySize(long bodySize)
-
process
public static void process(QpidByteBuffer buffer, ChannelMethodProcessor methodProcessor, long size) throws AMQFrameDecodingException
- Throws:
AMQFrameDecodingException
-
dispose
public void dispose()
-
clearEncodedForm
public void clearEncodedForm()
-
reallocate
public void reallocate()
-
-