<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">

Oracle® Streams Advanced Queuing Java API Reference
Release 1 (10.1)

B12023-01

oracle.jms
Class AQjmsAdtMessage

java.lang.Object
  |
  +--oracle.jms.AQjmsMessage
        |
        +--oracle.jms.AQjmsAdtMessage
All Implemented Interfaces:
AdtMessage, Message

public class AQjmsAdtMessage
extends AQjmsMessage
implements AdtMessage

Oracle class implementing oracle.jms.AdtMessage Allows use of the JMS api for messages stored in AQ queues containing Oracle ADT payloads.


Field Summary

 

Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE

 

Method Summary
 void clearBody()
          Clear out the message body.
 java.lang.Object getAdtPayload()
          Get the CustomDatum/ORAData object containing this Adt message's data Important: CustomDatum support will be deprecated in a future release.
 boolean getBooleanProperty(java.lang.String name)
          Return the boolean property value with the given name.
 byte getByteProperty(java.lang.String name)
          Return the byte property value with the given name.
 double getDoubleProperty(java.lang.String name)
          Return the double property value with the given name.
 float getFloatProperty(java.lang.String name)
          Return the float property value with the given name.
 int getIntProperty(java.lang.String name)
          Return the integer property value with the given name.
 java.lang.String getJMSMessageID()
          Get the message ID.
 javax.jms.Destination getJMSReplyTo()
          Get where a reply to this message should be sent.
 long getJMSTimestamp()
          Get the message timestamp.
 java.lang.String getJMSType()
          Get the message type.
 long getLongProperty(java.lang.String name)
          Return the long property value with the given name.
 java.lang.Object getObjectProperty(java.lang.String name)
          Return the Java object property value with the given name.
 java.util.Enumeration getPropertyNames()
          Return an Enumeration of all the property names.
 short getShortProperty(java.lang.String name)
          Return the short property value with the given name.
 java.lang.String getStringProperty(java.lang.String name)
          Return the String property value with the given name.
 boolean propertyExists(java.lang.String name)
          Check if a property value exists.
 void setAdtPayload(oracle.sql.CustomDatum payload)
          set the CustomDatum object containing this Adt message's data Important: CustomDatum support (and hence this method) will be deprecated in a future release.
 void setAdtPayload(oracle.sql.ORAData payload)
          set the ORAData object containing this Adt message's data
 void setBooleanProperty(java.lang.String name, boolean value)
          Set a boolean property value with the given name, into the Message.
 void setByteProperty(java.lang.String name, byte value)
          Set a byte property value with the given name, into the Message.
 void setDoubleProperty(java.lang.String name, double value)
          Set a double property value with the given name, into the Message.
 void setFloatProperty(java.lang.String name, float value)
          Set a float property value with the given name, into the Message.
 void setIntProperty(java.lang.String name, int value)
          Set an integer property value with the given name, into the Message.
 void setJMSReplyTo(javax.jms.Destination replyTo)
          Set where a reply to this message should be sent.
 void setJMSTimestamp(long timestamp)
          Set the message timestamp.
 void setJMSType(java.lang.String type)
          Set the message type.
 void setLongProperty(java.lang.String name, long value)
          Set a long property value with the given name, into the Message.
 void setObjectProperty(java.lang.String name, java.lang.Object value)
          Set a Java object property value with the given name, into the Message.
 void setShortProperty(java.lang.String name, short value)
          Set a short property value with the given name, into the Message.
 void setStringProperty(java.lang.String name, java.lang.String value)
          Set a String property value with the given name, into the Message.

 

Methods inherited from class oracle.jms.AQjmsMessage
acknowledge, clearProperties, closeContainer, getAttempts, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageIDAsBytes, getJMSPriority, getJMSRedelivered, getMessageCont, getSenderID, getUserPropertyNames, populateMessageContainer, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setSenderID, write_lob

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface javax.jms.Message
acknowledge, clearProperties, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSPriority, getJMSRedelivered, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered

 

Method Detail

getJMSMessageID

public java.lang.String getJMSMessageID()
                                 throws JMSException
Get the message ID. The messageID header field contains a value that uniquely identifies each message sent by a provider. When the send method returns it contains a provider-assigned value.
Specified by:
getJMSMessageID in interface Message
Overrides:
getJMSMessageID in class AQjmsMessage
Returns:
the message ID as a string)
Throws:
JMSException - if JMS fails to get the message Id due to internal JMS error.
See Also:
Message.setJMSMessageID(String), MessageProducer.setDisableMessageID(boolean)

getJMSReplyTo

public javax.jms.Destination getJMSReplyTo()
                                    throws JMSException
Get where a reply to this message should be sent.
Specified by:
getJMSReplyTo in interface Message
Overrides:
getJMSReplyTo in class AQjmsMessage
Returns:
Destination to which to send a response to this message
Throws:
JMSException - NOT_SUPPORTED for AdtMessage
See Also:
Message.setJMSReplyTo(Destination)

setJMSReplyTo

public void setJMSReplyTo(javax.jms.Destination replyTo)
                   throws JMSException
Set where a reply to this message should be sent.
Specified by:
setJMSReplyTo in interface Message
Overrides:
setJMSReplyTo in class AQjmsMessage
Parameters:
replyTo - Destination to which to send a response to this message
Throws:
JMSException - NOT_SUPPORTED for AdtMessage
See Also:
Message.getJMSReplyTo()

getJMSType

public java.lang.String getJMSType()
                            throws JMSException
Get the message type.
Specified by:
getJMSType in interface Message
Overrides:
getJMSType in class AQjmsMessage
Returns:
the message type
Throws:
JMSException - NOT_SUPPORTED for AdtMessage
See Also:
Message.setJMSType(String)

setJMSType

public void setJMSType(java.lang.String type)
                throws JMSException
Set the message type.
Specified by:
setJMSType in interface Message
Overrides:
setJMSType in class AQjmsMessage
Parameters:
type - of the message
Throws:
JMSException - NOT_SUPPORTED for AdtMessage
See Also:
Message.getJMSType()

getJMSTimestamp

public long getJMSTimestamp()
                     throws JMSException
Get the message timestamp. The JMSTimestamp header field contains the time a message was handed off to a provider to be sent. When a message is sent, JMSTimestamp is ignored. When the send is complete - this method will contain the time the message was enqueued.
Specified by:
getJMSTimestamp in interface Message
Overrides:
getJMSTimestamp in class AQjmsMessage
Returns:
timestamp (format is a normal Java millis time value)
Throws:
JMSException - if JMS fails to get the Timestamp
See Also:
Message.setJMSTimestamp(long), MessageProducer.setDisableMessageTimestamp(boolean)

setJMSTimestamp

public void setJMSTimestamp(long timestamp)
                     throws JMSException
Set the message timestamp. Providers set this field when a message is sent.
Specified by:
setJMSTimestamp in interface Message
Overrides:
setJMSTimestamp in class AQjmsMessage
Parameters:
timestamp - the timestamp for this message
Throws:
JMSException - if JMS fails to set the timestamp due to some internal JMS error.
See Also:
Message.getJMSTimestamp()

propertyExists

public boolean propertyExists(java.lang.String name)
                       throws JMSException
Check if a property value exists.
Specified by:
propertyExists in interface Message
Overrides:
propertyExists in class AQjmsMessage
Parameters:
name - the name of the property to test
Returns:
true if the property does exist.
Throws:
JMSException - if JMS fails to check if property exists due to some internal JMS error.

getBooleanProperty

public boolean getBooleanProperty(java.lang.String name)
                           throws JMSException
Return the boolean property value with the given name.
Specified by:
getBooleanProperty in interface Message
Overrides:
getBooleanProperty in class AQjmsMessage
Parameters:
name - the name of the boolean property
Returns:
the boolean property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getByteProperty

public byte getByteProperty(java.lang.String name)
                     throws JMSException
Return the byte property value with the given name.
Specified by:
getByteProperty in interface Message
Overrides:
getByteProperty in class AQjmsMessage
Parameters:
name - the name of the byte property
Returns:
the byte property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getShortProperty

public short getShortProperty(java.lang.String name)
                       throws JMSException
Return the short property value with the given name.
Specified by:
getShortProperty in interface Message
Overrides:
getShortProperty in class AQjmsMessage
Parameters:
name - the name of the short property
Returns:
the short property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getIntProperty

public int getIntProperty(java.lang.String name)
                   throws JMSException
Return the integer property value with the given name.
Specified by:
getIntProperty in interface Message
Overrides:
getIntProperty in class AQjmsMessage
Parameters:
name - the name of the integer property
Returns:
the integer property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getLongProperty

public long getLongProperty(java.lang.String name)
                     throws JMSException
Return the long property value with the given name.
Specified by:
getLongProperty in interface Message
Overrides:
getLongProperty in class AQjmsMessage
Parameters:
name - the name of the long property
Returns:
the long property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getFloatProperty

public float getFloatProperty(java.lang.String name)
                       throws JMSException
Return the float property value with the given name.
Specified by:
getFloatProperty in interface Message
Overrides:
getFloatProperty in class AQjmsMessage
Parameters:
name - the name of the float property
Returns:
the float property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getDoubleProperty

public double getDoubleProperty(java.lang.String name)
                         throws JMSException
Return the double property value with the given name.
Specified by:
getDoubleProperty in interface Message
Overrides:
getDoubleProperty in class AQjmsMessage
Parameters:
name - the name of the double property
Returns:
the double property value with the given name.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getStringProperty

public java.lang.String getStringProperty(java.lang.String name)
                                   throws JMSException
Return the String property value with the given name.
Specified by:
getStringProperty in interface Message
Overrides:
getStringProperty in class AQjmsMessage
Parameters:
name - the name of the String property
Returns:
the String property value with the given name. If there is no property by this name, a null value is returned.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.
MessageFormatException - if this type conversion is invalid.

getObjectProperty

public java.lang.Object getObjectProperty(java.lang.String name)
                                   throws JMSException
Return the Java object property value with the given name.

Note that this method can be used to return in objectified format, an object that had been stored as a property in the Message with the equivalent setObject method call, or it's equivalent primitive set<type> method.

Specified by:
getObjectProperty in interface Message
Overrides:
getObjectProperty in class AQjmsMessage
Parameters:
name - the name of the Java object property
Returns:
the Java object property value with the given name, in objectified format (ie. if it set as an int, then a Integer is returned). If there is no property by this name, a null value is returned.
Throws:
JMSException - if JMS fails to get Property due to some internal JMS error.

getPropertyNames

public java.util.Enumeration getPropertyNames()
                                       throws JMSException
Return an Enumeration of all the property names.
Specified by:
getPropertyNames in interface Message
Overrides:
getPropertyNames in class AQjmsMessage
Returns:
an enumeration of all the names of property values.
Throws:
JMSException - if JMS fails to get Property names due to some internal JMS error.

setBooleanProperty

public void setBooleanProperty(java.lang.String name,
                               boolean value)
                        throws JMSException
Set a boolean property value with the given name, into the Message.
Specified by:
setBooleanProperty in interface Message
Overrides:
setBooleanProperty in class AQjmsMessage
Parameters:
name - the name of the boolean property
value - the boolean property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setByteProperty

public void setByteProperty(java.lang.String name,
                            byte value)
                     throws JMSException
Set a byte property value with the given name, into the Message.
Specified by:
setByteProperty in interface Message
Overrides:
setByteProperty in class AQjmsMessage
Parameters:
name - the name of the byte property
value - the byte property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setShortProperty

public void setShortProperty(java.lang.String name,
                             short value)
                      throws JMSException
Set a short property value with the given name, into the Message.
Specified by:
setShortProperty in interface Message
Overrides:
setShortProperty in class AQjmsMessage
Parameters:
name - the name of the short property
value - the short property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setIntProperty

public void setIntProperty(java.lang.String name,
                           int value)
                    throws JMSException
Set an integer property value with the given name, into the Message.
Specified by:
setIntProperty in interface Message
Overrides:
setIntProperty in class AQjmsMessage
Parameters:
name - the name of the integer property
value - the integer property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setLongProperty

public void setLongProperty(java.lang.String name,
                            long value)
                     throws JMSException
Set a long property value with the given name, into the Message.
Specified by:
setLongProperty in interface Message
Overrides:
setLongProperty in class AQjmsMessage
Parameters:
name - the name of the long property
value - the long property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setFloatProperty

public void setFloatProperty(java.lang.String name,
                             float value)
                      throws JMSException
Set a float property value with the given name, into the Message.
Specified by:
setFloatProperty in interface Message
Overrides:
setFloatProperty in class AQjmsMessage
Parameters:
name - the name of the float property
value - the float property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setDoubleProperty

public void setDoubleProperty(java.lang.String name,
                              double value)
                       throws JMSException
Set a double property value with the given name, into the Message.
Specified by:
setDoubleProperty in interface Message
Overrides:
setDoubleProperty in class AQjmsMessage
Parameters:
name - the name of the double property
value - the double property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setStringProperty

public void setStringProperty(java.lang.String name,
                              java.lang.String value)
                       throws JMSException
Set a String property value with the given name, into the Message.
Specified by:
setStringProperty in interface Message
Overrides:
setStringProperty in class AQjmsMessage
Parameters:
name - the name of the String property
value - the String property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageNotWriteableException - if properties are read-only

setObjectProperty

public void setObjectProperty(java.lang.String name,
                              java.lang.Object value)
                       throws JMSException
Set a Java object property value with the given name, into the Message.

Note that this method only works for the objectified primitive object types (Integer, Double, Long ...) and String's.

Specified by:
setObjectProperty in interface Message
Overrides:
setObjectProperty in class AQjmsMessage
Parameters:
name - the name of the Java object property.
value - the Java object property value to set in the Message.
Throws:
JMSException - if JMS fails to set Property due to some internal JMS error.
MessageFormatException - if object is invalid
MessageNotWriteableException - if properties are read-only

clearBody

public void clearBody()
               throws JMSException
Clear out the message body. All other parts of the message are left untouched.
Specified by:
clearBody in interface Message
Overrides:
clearBody in class AQjmsMessage
Throws:
JMSException - if JMS fails to due to some internal JMS error.

setAdtPayload

public void setAdtPayload(oracle.sql.CustomDatum payload)
                   throws JMSException
Description copied from interface: AdtMessage
set the CustomDatum object containing this Adt message's data

Important: CustomDatum support (and hence this method) will be deprecated in a future release.

Use setAdtPayload (ORAData payload) instead.

Specified by:
setAdtPayload in interface AdtMessage
Parameters:
payload - the message's data (the object must implement the CustomDatum interface). This payload must be a java object that represents the ADT that is defined as the queue/topic payload type
Throws:
JMSException - if JMS fails to set the adt payload
See Also:
AdtMessage.setAdtPayload(ORAData)

setAdtPayload

public void setAdtPayload(oracle.sql.ORAData payload)
                   throws JMSException
Description copied from interface: AdtMessage
set the ORAData object containing this Adt message's data
Specified by:
setAdtPayload in interface AdtMessage
Parameters:
payload - the message's data (the object must implement the ORAData interface). This payload must be a java object that represents the ADT that is defined as the queue/topic payload type
Throws:
JMSException - if JMS fails to set the adt payload

getAdtPayload

public java.lang.Object getAdtPayload()
                               throws JMSException
Description copied from interface: AdtMessage
Get the CustomDatum/ORAData object containing this Adt message's data

Important: CustomDatum support will be deprecated in a future release.

Specified by:
getAdtPayload in interface AdtMessage
Returns:
the object containing this message's data
Throws:
JMSException - if JMS fails to get object due to some internal JMS error.

Oracle® Streams Advanced Queuing Java API Reference
Release 1 (10.1)

B12023-01

Copyright © 2003, Oracle. All Rights Reserved.