org.apache.qpid.client.message
Class AbstractBytesMessage

java.lang.Object
  extended by org.apache.qpid.client.message.AbstractJMSMessage
      extended by org.apache.qpid.client.message.AbstractBytesMessage
All Implemented Interfaces:
Message
Direct Known Subclasses:
AbstractBytesTypedMessage, JMSBytesMessage

public abstract class AbstractBytesMessage
extends AbstractJMSMessage


Field Summary
 
Fields inherited from class org.apache.qpid.client.message.AbstractJMSMessage
_changedData, _data, _delegate, _readableMessage
 
Fields inherited from interface org.apache.qpid.jms.Message
JMS_TYPE
 
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
AbstractBytesMessage(AMQMessageDelegate delegate, org.apache.mina.common.ByteBuffer data)
           
AbstractBytesMessage(AMQMessageDelegateFactory delegateFactory)
           
AbstractBytesMessage(AMQMessageDelegateFactory delegateFactory, org.apache.mina.common.ByteBuffer data)
          Construct a bytes message with existing data.
 
Method Summary
protected  void allocateInitialBuffer()
           
protected  void checkAvailable(int len)
          Check that there is at least a certain number of bytes available to read
 void clearBodyImpl()
          This forces concrete classes to implement clearBody()
 String toBodyString()
          Get a String representation of the body of the message.
 
Methods inherited from class org.apache.qpid.client.message.AbstractJMSMessage
acknowledge, acknowledgeThis, checkReadable, checkWritable, clearBody, clearProperties, getAMQSession, getBooleanProperty, getByteProperty, getContentLength, getContentType, getData, getDelegate, getDeliveryTag, getDoubleProperty, getEncoding, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getMimeType, getObjectProperty, getPropertyNames, getReplyToString, getShortProperty, getStringProperty, prepareForSending, propertyExists, receivedFromServer, removeProperty, reset, setAMQSession, setBooleanProperty, setByteProperty, setContentType, setDoubleProperty, setEncoding, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractBytesMessage

AbstractBytesMessage(AMQMessageDelegateFactory delegateFactory)

AbstractBytesMessage

AbstractBytesMessage(AMQMessageDelegateFactory delegateFactory,
                     org.apache.mina.common.ByteBuffer data)
Construct a bytes message with existing data.

Parameters:
delegateFactory -
data - the data that comprises this message. If data is null, you get a 1024 byte buffer that is

AbstractBytesMessage

AbstractBytesMessage(AMQMessageDelegate delegate,
                     org.apache.mina.common.ByteBuffer data)
               throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException
Method Detail

allocateInitialBuffer

protected void allocateInitialBuffer()

clearBodyImpl

public void clearBodyImpl()
                   throws JMSException
Description copied from class: AbstractJMSMessage
This forces concrete classes to implement clearBody()

Specified by:
clearBodyImpl in class AbstractJMSMessage
Throws:
JMSException

toBodyString

public String toBodyString()
                    throws JMSException
Description copied from class: AbstractJMSMessage
Get a String representation of the body of the message. Used in the toString() method which outputs this before message properties.

Specified by:
toBodyString in class AbstractJMSMessage
Throws:
JMSException

checkAvailable

protected void checkAvailable(int len)
                       throws MessageEOFException
Check that there is at least a certain number of bytes available to read

Parameters:
len - the number of bytes
Throws:
MessageEOFException - if there are less than len bytes available to read


Licensed to the Apache Software Foundation