org.apache.qpid.api
Interface Message


public interface Message


Method Summary
 void appendData(byte[] src)
          This will abstract the underlying message data.
 void appendData(ByteBuffer src)
          This will abstract the underlying message data.
 void clearData()
          This should clear the body of the message.
 DeliveryProperties getDeliveryProperties()
           
 Header getHeader()
           
 MessageProperties getMessageProperties()
           
 int getMessageTransferId()
          The provides access to the command Id assigned to the message transfer.
 ByteBuffer readData()
          * This will abstract the underlying message data.
 void readData(byte[] target)
          This will abstract the underlying message data.
 void setHeader(Header header)
           
 

Method Detail

getHeader

Header getHeader()

setHeader

void setHeader(Header header)

getMessageProperties

MessageProperties getMessageProperties()

getDeliveryProperties

DeliveryProperties getDeliveryProperties()

appendData

void appendData(byte[] src)
                throws IOException
This will abstract the underlying message data. The Message implementation may not hold all message data in memory (especially in the case of large messages) The appendData function might write data to

Parameters:
src - - the data to append
Throws:
IOException

appendData

void appendData(ByteBuffer src)
                throws IOException
This will abstract the underlying message data. The Message implementation may not hold all message data in memory (especially in the case of large messages) The appendData function might write data to

Parameters:
src - - the data to append
Throws:
IOException

readData

void readData(byte[] target)
              throws IOException
This will abstract the underlying message data. The Message implementation may not hold all message data in memory (especially in the case of large messages) The read function might copy data from

Parameters:
target - The target byte[] which the data gets copied to
Throws:
IOException

readData

ByteBuffer readData()
                    throws IOException
* This will abstract the underlying message data. The Message implementation may not hold all message data in memory (especially in the case of large messages) The read function might copy data from

Returns:
A ByteBuffer containing data
Throws:
IOException

clearData

void clearData()
This should clear the body of the message.


getMessageTransferId

int getMessageTransferId()
The provides access to the command Id assigned to the message transfer. This id is useful when you do

Returns:
the message transfer id.


Licensed to the Apache Software Foundation