org.apache.qpid.client.message
Class AMQMessageDelegate_0_10

java.lang.Object
  extended by org.apache.qpid.client.message.AbstractAMQMessageDelegate
      extended by org.apache.qpid.client.message.AMQMessageDelegate_0_10
All Implemented Interfaces:
AMQMessageDelegate

public class AMQMessageDelegate_0_10
extends AbstractAMQMessageDelegate

This extends AbstractAMQMessageDelegate which contains common code between both the 0_8 and 0_10 Message types.


Field Summary
static String JMS_TYPE
           
 
Constructor Summary
protected AMQMessageDelegate_0_10()
           
protected AMQMessageDelegate_0_10(org.apache.qpid.transport.MessageProperties messageProps, org.apache.qpid.transport.DeliveryProperties deliveryProps, long deliveryTag)
           
 
Method Summary
 void acknowledge()
           
 void acknowledgeThis()
           
protected  void checkIdentiferFormat(CharSequence propertyName)
           
protected  void checkPropertyName(CharSequence propertyName)
           
protected  void checkWritableProperties()
           
 void clearProperties()
           
 AMQSession getAMQSession()
           
 boolean getBooleanProperty(String propertyName)
           
 byte getByteProperty(String propertyName)
           
 String getContentType()
           
 org.apache.qpid.transport.DeliveryProperties getDeliveryProperties()
           
 long getDeliveryTag()
          Get the AMQ message number assigned to this message
 double getDoubleProperty(String propertyName)
           
 String getEncoding()
           
 float getFloatProperty(String propertyName)
           
 int getIntProperty(String propertyName)
           
 String getJMSCorrelationID()
           
 byte[] getJMSCorrelationIDAsBytes()
           
 int getJMSDeliveryMode()
           
 Destination getJMSDestination()
           
 long getJMSExpiration()
           
 String getJMSMessageID()
           
 int getJMSPriority()
           
 Destination getJMSReplyTo()
           
 long getJMSTimestamp()
           
 String getJMSType()
           
 long getLongProperty(String propertyName)
           
 org.apache.qpid.transport.MessageProperties getMessageProperties()
           
 Object getObjectProperty(String propertyName)
           
 Enumeration getPropertyNames()
           
 String getReplyToString()
           
 short getShortProperty(String propertyName)
           
 String getStringProperty(String propertyName)
           
 boolean propertyExists(String propertyName)
           
 void removeProperty(String propertyName)
           
 void setAMQSession(AMQSession s)
          The session is set when CLIENT_ACKNOWLEDGE mode is used so that the CHANNEL ACK can be sent when the user calls acknowledge()
 void setBooleanProperty(String propertyName, boolean b)
           
 void setByteProperty(String propertyName, byte b)
           
 void setContentType(String contentType)
           
 void setDoubleProperty(String propertyName, double v)
           
 void setEncoding(String encoding)
           
 void setFloatProperty(String propertyName, float f)
           
 void setIntProperty(String propertyName, int i)
           
 void setJMSCorrelationID(String correlationId)
           
 void setJMSCorrelationIDAsBytes(byte[] bytes)
           
 void setJMSDeliveryMode(int deliveryMode)
           
 void setJMSDestination(Destination destination)
           
 void setJMSExpiration(long l)
           
 void setJMSMessageID(String messageId)
           
 void setJMSMessageID(UUID messageId)
           
 void setJMSPriority(int i)
           
 void setJMSReplyTo(Destination destination)
           
 void setJMSTimestamp(long timestamp)
           
 void setJMSType(String type)
           
 void setLongProperty(String propertyName, long l)
           
 void setObjectProperty(String propertyName, Object object)
           
 void setShortProperty(String propertyName, short i)
           
 void setStringProperty(String propertyName, String value)
           
static void updateExchangeTypeMapping(org.apache.qpid.transport.Header header, org.apache.qpid.transport.Session session)
          Use the 0-10 ExchangeQuery call to validate the exchange type.
 
Methods inherited from class org.apache.qpid.client.message.AbstractAMQMessageDelegate
exchangeMapContains, generateDestination, updateExchangeType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JMS_TYPE

public static final String JMS_TYPE
See Also:
Constant Field Values
Constructor Detail

AMQMessageDelegate_0_10

protected AMQMessageDelegate_0_10()

AMQMessageDelegate_0_10

protected AMQMessageDelegate_0_10(org.apache.qpid.transport.MessageProperties messageProps,
                                  org.apache.qpid.transport.DeliveryProperties deliveryProps,
                                  long deliveryTag)
Method Detail

updateExchangeTypeMapping

public static void updateExchangeTypeMapping(org.apache.qpid.transport.Header header,
                                             org.apache.qpid.transport.Session session)
Use the 0-10 ExchangeQuery call to validate the exchange type. This is used primarily to provide the correct JMSDestination value. The query is performed synchronously iff the map exchange is not already present in the exchange Map.

Parameters:
header - The message headers, from which the exchange name can be extracted
session - The 0-10 session to use to call ExchangeQuery

getJMSMessageID

public String getJMSMessageID()
                       throws JMSException
Throws:
JMSException

setJMSMessageID

public void setJMSMessageID(String messageId)
                     throws JMSException
Throws:
JMSException

setJMSMessageID

public void setJMSMessageID(UUID messageId)
                     throws JMSException
Throws:
JMSException

getJMSTimestamp

public long getJMSTimestamp()
                     throws JMSException
Throws:
JMSException

setJMSTimestamp

public void setJMSTimestamp(long timestamp)
                     throws JMSException
Throws:
JMSException

getJMSCorrelationIDAsBytes

public byte[] getJMSCorrelationIDAsBytes()
                                  throws JMSException
Throws:
JMSException

setJMSCorrelationIDAsBytes

public void setJMSCorrelationIDAsBytes(byte[] bytes)
                                throws JMSException
Throws:
JMSException

setJMSCorrelationID

public void setJMSCorrelationID(String correlationId)
                         throws JMSException
Throws:
JMSException

getJMSCorrelationID

public String getJMSCorrelationID()
                           throws JMSException
Throws:
JMSException

getJMSReplyTo

public Destination getJMSReplyTo()

setJMSReplyTo

public void setJMSReplyTo(Destination destination)
                   throws JMSException
Throws:
JMSException

getJMSDestination

public Destination getJMSDestination()
                              throws JMSException
Throws:
JMSException

setJMSDestination

public void setJMSDestination(Destination destination)

setContentType

public void setContentType(String contentType)

getContentType

public String getContentType()

setEncoding

public void setEncoding(String encoding)

getEncoding

public String getEncoding()

getReplyToString

public String getReplyToString()

getJMSDeliveryMode

public int getJMSDeliveryMode()
                       throws JMSException
Throws:
JMSException

setJMSDeliveryMode

public void setJMSDeliveryMode(int deliveryMode)
                        throws JMSException
Throws:
JMSException

getJMSType

public String getJMSType()
                  throws JMSException
Throws:
JMSException

setJMSType

public void setJMSType(String type)
                throws JMSException
Throws:
JMSException

getJMSExpiration

public long getJMSExpiration()
                      throws JMSException
Throws:
JMSException

setJMSExpiration

public void setJMSExpiration(long l)
                      throws JMSException
Throws:
JMSException

propertyExists

public boolean propertyExists(String propertyName)
                       throws JMSException
Throws:
JMSException

getBooleanProperty

public boolean getBooleanProperty(String propertyName)
                           throws JMSException
Throws:
JMSException

getByteProperty

public byte getByteProperty(String propertyName)
                     throws JMSException
Throws:
JMSException

getShortProperty

public short getShortProperty(String propertyName)
                       throws JMSException
Throws:
JMSException

getIntProperty

public int getIntProperty(String propertyName)
                   throws JMSException
Throws:
JMSException

getLongProperty

public long getLongProperty(String propertyName)
                     throws JMSException
Throws:
JMSException

getFloatProperty

public float getFloatProperty(String propertyName)
                       throws JMSException
Throws:
JMSException

getDoubleProperty

public double getDoubleProperty(String propertyName)
                         throws JMSException
Throws:
JMSException

getStringProperty

public String getStringProperty(String propertyName)
                         throws JMSException
Throws:
JMSException

getObjectProperty

public Object getObjectProperty(String propertyName)
                         throws JMSException
Throws:
JMSException

getPropertyNames

public Enumeration getPropertyNames()
                             throws JMSException
Throws:
JMSException

setBooleanProperty

public void setBooleanProperty(String propertyName,
                               boolean b)
                        throws JMSException
Throws:
JMSException

setByteProperty

public void setByteProperty(String propertyName,
                            byte b)
                     throws JMSException
Throws:
JMSException

setShortProperty

public void setShortProperty(String propertyName,
                             short i)
                      throws JMSException
Throws:
JMSException

setIntProperty

public void setIntProperty(String propertyName,
                           int i)
                    throws JMSException
Throws:
JMSException

setLongProperty

public void setLongProperty(String propertyName,
                            long l)
                     throws JMSException
Throws:
JMSException

setFloatProperty

public void setFloatProperty(String propertyName,
                             float f)
                      throws JMSException
Throws:
JMSException

setDoubleProperty

public void setDoubleProperty(String propertyName,
                              double v)
                       throws JMSException
Throws:
JMSException

setStringProperty

public void setStringProperty(String propertyName,
                              String value)
                       throws JMSException
Throws:
JMSException

setObjectProperty

public void setObjectProperty(String propertyName,
                              Object object)
                       throws JMSException
Throws:
JMSException

removeProperty

public void removeProperty(String propertyName)
                    throws JMSException
Throws:
JMSException

checkWritableProperties

protected void checkWritableProperties()
                                throws MessageNotWriteableException
Throws:
MessageNotWriteableException

getJMSPriority

public int getJMSPriority()
                   throws JMSException
Throws:
JMSException

setJMSPriority

public void setJMSPriority(int i)
                    throws JMSException
Throws:
JMSException

clearProperties

public void clearProperties()
                     throws JMSException
Throws:
JMSException

acknowledgeThis

public void acknowledgeThis()
                     throws JMSException
Throws:
JMSException

acknowledge

public void acknowledge()
                 throws JMSException
Throws:
JMSException

setAMQSession

public void setAMQSession(AMQSession s)
The session is set when CLIENT_ACKNOWLEDGE mode is used so that the CHANNEL ACK can be sent when the user calls acknowledge()

Parameters:
s - the AMQ session that delivered this message

getAMQSession

public AMQSession getAMQSession()

getDeliveryTag

public long getDeliveryTag()
Get the AMQ message number assigned to this message

Returns:
the message number

checkPropertyName

protected void checkPropertyName(CharSequence propertyName)

checkIdentiferFormat

protected void checkIdentiferFormat(CharSequence propertyName)

getMessageProperties

public org.apache.qpid.transport.MessageProperties getMessageProperties()

getDeliveryProperties

public org.apache.qpid.transport.DeliveryProperties getDeliveryProperties()


Licensed to the Apache Software Foundation