Skip Headers

Oracle9i Supplied Java Packages Reference
Release 2 (9.2)

Part Number A96609-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

4
Package oracle.jms

This chapter describes the Oracle Java Messaging Service (OJMS) interfaces and classes that are contained in package oracle.jms. The Oracle JMS interfaces extend the standard JMS interfaces to support the Oracle9i Advanced Queing (AQ) administrative operations and other AQ features that are not included in the public standard contained in the javax.jms package.

This chapter contains these sections:


Package oracle.jms Description

The Oracle package oracle.jms provides a set of interfaces and associated semantics based on the Java Messaging Service (JMS) standard. These interfaces define how a JMS client accesses the facilities of an enterprise messaging product like Oracle9i Advanced Queuing. Advanced Queuing (AQ) is the unique database-integrated message queuing feature of the Oracle9i database. Oracle supports the standard JMS interfaces and has extensions to support the AQ administrative operations and other AQ features that are not included in the public standard.

See Also:

Oracle9i Application Developer's Guide - Advanced Queuing

Accessing Standard JMS and Oracle JMS Packages

Oracle JMS uses JDBC to connect to the database. Therefore, its applications can run as follows:

The standard JMS interfaces are contained in the javax.jms package (refer to Sun J2EE documentation for details). The Oracle JMS interfaces extend javax.jms and are contained in the oracle.jms package.

Using the OCI9 or Thin JDBC Driver

To use JMS interfaces with clients running outside the database, you must include the appropriate JDBC driver, JNDI jar files, and the following AQ jar files in your CLASSPATH. (The CLASSPATH is the operating system environmental variable that the JVM uses to find the classes it needs to run applications.)

For JDK 1.3 include:

            $ORACLE_HOME/rdbms/jlib/jmscommon.jar
            $ORACLE_HOME/rdbms/jlib/aqapi13.jar 
            $ORACLE_HOME/jdbc/lib/jndi.zip 
            $ORACLE_HOME/jdbc/lib/classes13.zip

For JDK 1.2 include:

            $ORACLE_HOME/rdbms/jlib/jmscommon.jar
            $ORACLE_HOME/rdbms/jlib/aqapi12.jar 
            $ORACLE_HOME/jdbc/lib/jndi.zip 
            $ORACLE_HOME/jdbc/lib/classes12.zip

For JDK 1.1 include:

            $ORACLE_HOME/rdbms/jlib/jmscommon.jar
            $ORACLE_HOME/rdbms/jlib/aqapi11.jar
            $ORACLE_HOME/jdbc/lib/jndi.zip
            $ORACLE_HOME/jdbc/lib/classes11.zip

Using Oracle Server Driver in JServer

If your application is running inside the JServer, you should be able to access the Oracle JMS classes that have been automatically loaded when the JServer was installed. If these classes are not available, you may have to load jmscommon.jar followed by aqapi.jar using the loadjava utility.

Privileges Required

Users must have EXECUTE privilege on DBMS_AQIN and DBMS_AQJMS packages in order to use the Oracle JMS interfaces. Users can also acquire these rights through the AQ_USER_ROLE or the AQ_ADMINSTRATOR_ROLE.

Users will also need the appropriate system and Queue or Topic privileges to send or receive messages.


Package oracle.jms Summary

Table 4-1  Summary of interfaces for oracle.jms
Interface Description

AdtMessage

This interface extends the Message interface and represents messages containing Oracle object type payloads - this is an AQ extension to JMS.

AQjmsQueueReceiver

This interface extends javax.jms.QueueReceiver and defines AQ extensions to JMS. A client uses a QueueReceiver for receiving messages that have been delivered to a Queue.

AQjmsQueueSender

This interface extends QueueSender and defines AQ extensions to JMS. A client uses a QueueSender to send messages to a Queue.

AQjmsTopicPublisher

This interface extends TopicPublisher and defines AQ extensions to JMS. A client uses a TopicPublisher for publishing messages to a Topic.

AQjmsTopicReceiver

This interface extends the TopicReceiver interface that defines AQ extensions for remote subscribers and explicitly specified recipients (in point-to-mulitpoint communication). A TopicReceiver is used to receive messages from a Topic.

AQjmsTopicSubscriber

This interface extends TopicSubscriber and defines AQ extensions to JMS. A client uses a TopicSubscriber to receive messages published on a Topic.

TopicBrowser

This interface extends MessageConsumer to allow remote subscribers to look at messages on a topic without removing them.

TopicReceiver

This interface extends MessageConsumer to allow remote subscribers and explicitly specified recipients (in point-to-multipoint communication) to receive messages.

Table 4-2  Summary of Classes for oracle.jms
Class Description

AQjmsAdtMessage

This class implements the AdtMessage interface. An AdtMessage is used to send a message containing Oracle object type payloads.

AQjmsAgent

This class implements the Destination interface. It is used to define remote subscribers and ReplyTo Destinations

AQjmsBytesMessage

This class implements the BytesMessage interface. A BytesMessage is used to send a message containing a stream of uninterpreted bytes

AQjmsConnection

This class implements the Connection interface. This is an active connection to the JMS provider

AQjmsConnectionMetaData

class AQjmsConnectionMetaData represents the Meta Data information available for a JMS Connection.

AQjmsConstants

This class defines the constants used in the oracle.jms package

AQjmsConsumer

This class implements the MessageConsumer interface

AQjmsDestination

This class implements administered objects, Queue and Topic

AQjmsDestinationProperty

This class defines Destination properties

AQjmsFactory

This class is used for accessing administered ConnectionFactory objects in Oracle's implementation of JMS.

AQjmsMapMessage

This class implements the MapMessage interface. A MapMessage is used to send a set of name-value pairs where names are Strings and values are java primitive types

AQjmsMessage

This class implements the Message interface. This is the superclass of all JMS messages

AQjmsObjectMessage

This class implements the ObjectMessage interface. An ObjectMessage is used to send a message that contains a serializable java object

AQjmsOracleDebug

AQ Oracle Debug class - not to be used unless instructed by Oracle Support

AQjmsProducer

This class implements the MessageProducer interface. A MessageProducer is used to send messages to a Destination

AQjmsQueueBrowser

This class implements the QueueBrowser interface. A QueueBrowser is used to look at messages in a Queue without removing them.

AQjmsQueueConnectionFactory

This class implements the QueueConnectionFactory interface. A QueueConnectionFactory is used to create QueueConnections

AQjmsSession

This class implements the javax.jms.Session interface. A Session is a single threaded context for producing a consuming messages

AQjmsStreamMessage

This class implements the StreamMessage interface. A StreamMessage is used to send a stream of java primitives

AQjmsTextMessage

This class implements the TextMessage interface. A TextMessage is used to send a message containing a java.lang.StringBuffer

AQjmsTopicBrowser

This class implements the TopicBrowser interface. A TopicBrowser is used to look at messages in a Topic without removing them.

AQjmsTopicConnectionFactory

This class implements the TopicConnectionFactory interface. A TopicConnectionFactory is used to create TopicConnections

Table 4-3  Exceptions for oracle.jms
Exception Description

AQjmsException

This exception extends JMSException - adds Oracle error codes. This is the root of all JMS exceptions

AQjmsIllegalStateException

This exception extends IllegalStateException. It is thrown when when an OJMS method is invoked at an illegal or inappropriate time, or when OJMS is not in an appropriate state for the requested operation.

AQjmsInvalidDestinationException

This exception extends InvalidDestinationException. It is thrown when a Destination is not valid

AQjmsInvalidSelectorException

This exception extends InvalidSelectorException. It is thrown when the specified MessageSelector is not valid

AQjmsMessageEOFException

This exception extends MessageEOFException. It is thrown when an unexpected end of stream has been reached when a StreamMessage or BytesMessage is being read

AQjmsMessageFormatException

This exception extends MessageFormatException. It is thrown when a client attempts to use a datatype not supported by a message or attempts to read data in the message as the wrong type

AQjmsMessageNotReadableException

This exception extends MessageNotReadableException. It is thrown when a client attempts to read a write-only message

AQjmsMessageNotWriteableException

This exception extends MessageNotWriteableException. It is thrown when a client attempts to write a read-only message


AdtMessage

Syntax

public interface AdtMessage extends javax.jms.Message

All Superinterfaces

javax.jms.Message

All Known Implementing Classes

AQjmsAdtMessage

Description

This interface extends the Message interface and represents messages containing Oracle object type payloads.

 Member Summary Description

Methods

-

getAdtPayload()

Get the CustomDatum object containing this Adt message's data.

setAdtPayload(CustomDatum)

Set the CustomDatum object containing this Adt message's data

 Inherited Member Summary

Fields inherited from interface javax.jms.Message

DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE

Methods inherited from interface javax.jms.Message

clearBody, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty


Methods

getAdtPayload()

public oracle.sql.CustomDatum getAdtPayload()

Get the CustomDatum object containing this Adt message's data.

Returns

the object containing this message's data

Throws

JMSException - if JMS fails to get object due to some internal JMS error.

setAdtPayload(CustomDatum)

public void setAdtPayload(oracle.sql.CustomDatum payload)

set the CustomDatum object containing this ADT message's data.

ADT is for Asynchronous Data Transfer.

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

MessageNotWriteableException - if message in read-only mode.


AQjmsAdtMessage

Syntax

public class AQjmsAdtMessage extends AQjmsMessage implements AdtMessage
 
java.lang.Object
  |
  +--AQjmsMessage
        |
        +--oracle.jms.AQjmsAdtMessage

All Implemented Interfaces

AdtMessage, javax.jms.Message

Description

This class implements the AdtMessage interface. An AdtMessage is used to send a message containing Oracle object type payloads

 Member Summary

Description

Methods

-

clearBody()

Clear out the message body.

getAdtPayload()

Get the CustomDatum object containing this Adt message's data.

getBooleanProperty(String)

Return the boolean property value with the given name.

getByteProperty(String)

Return the byte property value with the given name.

getDoubleProperty(String)

Return the double property value with the given name.

getFloatProperty(String)

Return the float property value with the given name.

getIntProperty(String)

Return the integer property value with the given name.

getJMSReplyTo()

Get where a reply to this message should be sent.

getJMSType()

Get the message type.

getLongProperty(String)

Return the long property value with the given name.

getObjectProperty(String)

Return the Java object property value with the given name.

getPropertyNames()

Return an Enumeration of all the property names.

getShortProperty(String)

Return the short property value with the given name.

getStringProperty(String)

Return the String property value with the given name.

propertyExists(String)

Check if a property value exists.

setAdtPayload(CustomDatum)

set the CustomDatum object containing this Adt message's data

setBooleanProperty(String, boolean)

Set a boolean property value with the given name, into the Message.

setByteProperty(String, byte)

Set a byte property value with the given name, into the Message.

setDoubleProperty(String, double)

Set a double property value with the given name, into the Message.

setFloatProperty(String, float)

Set a float property value with the given name, into the Message.

setIntProperty(String, int)

Set an integer property value with the given name, into the Message.

setJMSReplyTo(Destination)

Set where a reply to this message should be sent.

setJMSType(String)

Set the message type.

setLongProperty(String, long)

Set a long property value with the given name, into the Message.

setObjectProperty(String, Object)

Set a Java object property value with the given name, into the Message.

setShortProperty(String, short)

Set a short property value with the given name, into the Message.

setStringProperty(String, String)

Set a String property value with the given name, into the Message.

 Inherited Member Summary

Fields inherited from interface javax.jms.Message

DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE

Methods inherited from class AQjmsMessage

clearProperties(), getJMSCorrelationID(), getJMSCorrelationIDAsBytes(), getJMSDeliveryMode(), getJMSDestination(), getJMSExpiration(), getJMSMessageID(), getJMSMessageIDAsBytes(), getJMSPriority(), getJMSRedelivered(), getJMSTimestamp(), getSenderID(), setJMSCorrelationID(String), setJMSCorrelationIDAsBytes(byte[]), setJMSDestination(Destination), setJMSExpiration(long), setJMSMessageID(String), setJMSPriority(int), setJMSRedelivered(boolean), setJMSTimestamp(long), setSenderID(AQjmsAgent)

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

clearProperties, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSTimestamp, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSTimestamp


Methods

clearBody()

public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

Overrides

clearBody() in class AQjmsMessage

Throws

JMSException - if JMS fails to due to some internal JMS error.

getAdtPayload()

public oracle.sql.CustomDatum getAdtPayload()

Get the CustomDatum object containing this Adt message's data.

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.

getBooleanProperty(String)

public boolean getBooleanProperty(java.lang.String name)

Return the boolean property value with the given name.

Specified By

javax.jms.Message.getBooleanProperty(java.lang.String) in interface javax.jms.Message

Overrides

getBooleanProperty(String) 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(String)

public byte getByteProperty(java.lang.String name)

Return the byte property value with the given name.

Specified By

javax.jms.Message.getByteProperty(java.lang.String) in interface javax.jms.Message

Overrides

getByteProperty(String) 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.

getDoubleProperty(String)

public double getDoubleProperty(java.lang.String name)

Return the double property value with the given name.

Specified By

javax.jms.Message.getDoubleProperty(java.lang.String) in interface javax.jms.Message

Overrides

getDoubleProperty(String) 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.

getFloatProperty(String)

public float getFloatProperty(java.lang.String name)

Return the float property value with the given name.

Specified By

javax.jms.Message.getFloatProperty(java.lang.String) in interface javax.jms.Message

Overrides

getFloatProperty(String) 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.

getIntProperty(String)

public int getIntProperty(java.lang.String name)

Return the integer property value with the given name.

Specified By

javax.jms.Message.getIntProperty(java.lang.String) in interface javax.jms.Message

Overrides

getIntProperty(String) 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.

getJMSReplyTo()

public javax.jms.Destination getJMSReplyTo()

Get where a reply to this message should be sent. This method is not supported for AdtMessages in this release

Specified By

javax.jms.Message.getJMSReplyTo() in interface javax.jms.Message

Overrides

getJMSReplyTo() in class AQjmsMessage

Throws

JMSException - NOT_SUPPORTED for AdtMessage

getJMSType()

public java.lang.String getJMSType()

Get the message type.This method is not supported for AdtMessages in this release

Specified By

javax.jms.Message.getJMSType() in interface javax.jms.Message

Overrides

getJMSType() in class AQjmsMessage

Returns

the message type

Throws

JMSException - NOT_SUPPORTED for AdtMessage

getLongProperty(String)

public long getLongProperty(java.lang.String name)

Return the long property value with the given name.

Specified By

javax.jms.Message.getLongProperty(java.lang.String) in interface javax.jms.Message

Overrides

getLongProperty(String) 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.

getObjectProperty(String)

public java.lang.Object getObjectProperty(java.lang.String name)

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 method.

Specified By

javax.jms.Message.getObjectProperty(java.lang.String) in interface javax.jms.Message

Overrides

getObjectProperty(String) 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 (i.e. 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 synchronized java.util.Enumeration getPropertyNames()

Return an Enumeration of all the property names.

Specified By

javax.jms.Message.getPropertyNames() in interface javax.jms.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.

getShortProperty(String)

public short getShortProperty(java.lang.String name)

Return the short property value with the given name.

Specified By

javax.jms.Message.getShortProperty(java.lang.String) in interface javax.jms.Message

Overrides

getShortProperty(String) 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.

getStringProperty(String)

public java.lang.String getStringProperty(java.lang.String name)

Return the String property value with the given name.

Specified By

javax.jms.Message.getStringProperty(java.lang.String) in interface javax.jms.Message

Overrides

getStringProperty(String) 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.

propertyExists(String)

public boolean propertyExists(java.lang.String name)

Check if a property value exists.

Specified By

javax.jms.Message.propertyExists(java.lang.String) in interface javax.jms.Message

Overrides

propertyExists(String) 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.

setAdtPayload(CustomDatum)

public void setAdtPayload(oracle.sql.CustomDatum payload)

set the CustomDatum object containing this Adt message's data

Specified By

setAdtPayload(CustomDatum) 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

MessageNotWriteableException - if message in read-only mode.

setBooleanProperty(String, boolean)

public void setBooleanProperty(java.lang.String name, boolean value)

Set a boolean property value with the given name, into the Message.

Specified By

javax.jms.Message.setBooleanProperty(java.lang.String, boolean) in interface javax.jms.Message

Overrides

setBooleanProperty(String, boolean) 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(String, byte)

public void setByteProperty(java.lang.String name, byte value)

Set a byte property value with the given name, into the Message.

Specified By

javax.jms.Message.setByteProperty(java.lang.String, byte) in interface javax.jms.Message

Overrides

setByteProperty(String, byte) 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

setDoubleProperty(String, double)

public void setDoubleProperty(java.lang.String name, double value)

Set a double property value with the given name, into the Message.

Specified By

javax.jms.Message.setDoubleProperty(java.lang.String, double) in interface javax.jms.Message

Overrides

setDoubleProperty(String, double) 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

setFloatProperty(String, float)

public void setFloatProperty(java.lang.String name, float value)

Set a float property value with the given name, into the Message.

Specified By

javax.jms.Message.setFloatProperty(java.lang.String, float) in interface javax.jms.Message

Overrides

setFloatProperty(String, float) 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

setIntProperty(String, int)

public void setIntProperty(java.lang.String name, int value)

Set an integer property value with the given name, into the Message.

Specified By

javax.jms.Message.setIntProperty(java.lang.String, int) in interface javax.jms.Message

Overrides

setIntProperty(String, int) 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

setJMSReplyTo(Destination)

public void setJMSReplyTo(javax.jms.Destination replyTo)

Set where a reply to this message should be sent. This method is not supported for AdtMessage in this release

Specified By

javax.jms.Message.setJMSReplyTo(javax.jms.Destination) in interface javax.jms.Message

Overrides

setJMSReplyTo(Destination) in class AQjmsMessage

Throws

JMSException - NOT_SUPPORTED for AdtMessage

setJMSType(String)

public void setJMSType(java.lang.String type)

Set the message type. This method is not supported for AdtMessages in this release

Specified By

javax.jms.Message.setJMSType(java.lang.String) in interface javax.jms.Message

Overrides

setJMSType(String) in class AQjmsMessage

Parameters

type - of the message

Throws

JMSException - NOT_SUPPORTED for AdtMessage

setLongProperty(String, long)

public void setLongProperty(java.lang.String name, long value)

Set a long property value with the given name, into the Message.

Specified By

javax.jms.Message.setLongProperty(java.lang.String, long) in interface javax.jms.Message

Overrides

setLongProperty(String, long) 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

setObjectProperty(String, Object)

public void setObjectProperty(java.lang.String name, java.lang.Object value)

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

javax.jms.Message.setObjectProperty(java.lang.String, java.lang.Object) in interface javax.jms.Message

Overrides

setObjectProperty(String, Object) 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

setShortProperty(String, short)

public void setShortProperty(java.lang.String name, short value)

Set a short property value with the given name, into the Message.

Specified By

javax.jms.Message.setShortProperty(java.lang.String, short) in interface javax.jms.Message

Overrides

setShortProperty(String, short) 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

setStringProperty(String, String)

public void setStringProperty(java.lang.String name, java.lang.String value)

Set a String property value with the given name, into the Message.

Specified By

javax.jms.Message.setStringProperty(java.lang.String, java.lang.String) in interface javax.jms.Message

Overrides

setStringProperty(String, String) 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


AQjmsAgent

Syntax

public class AQjmsAgent implements javax.jms.Destination

oracle.jms.AQjmsAgent

All Implemented Interfaces

javax.jms.Destination

Description

This class implements the Destination interface. It is used to define remote subscribers and ReplyTo Destinations

Member Summary Description

Constructors

-

AQjmsAgent(String, String)

Constructor

AQjmsAgent(String, String, int)

Constructor

Methods

-

getAddress()

Get the address of the agent

getName()

Get the name of the agent

getProtocol()

Get the protocol of the agent

setAddress(String)

Set the address of the agent

setName(String)

Set the name of the agent

setProtocol(int)

Set the protocol of the agent

toString()

Convert the agent to its string representation which is of the form: "[AQjmsAgent] \n name: NAME \n address: ADDRESS \n protocol: PROTOCOL"


Constructors

AQjmsAgent(String, String)

public  AQjmsAgent(java.lang.String name, java.lang.String address)

Constructor

Parameters

name - Name of the agent

address - Address of the agent

Throws

SQLException - if it fails to create an agent

AQjmsAgent(String, String, int)

public  AQjmsAgent(java.lang.String name, java.lang.String address, int 
protocol)

Constructor

Parameters

name - Name of the agent

address - Address of the agent

protocol - Protocol of the agent

Throws

SQLException - if it fails to create an agent


Methods

getAddress()

public java.lang.String getAddress()

Get the address of the agent

Returns

the address of the agent

Throws

SQLException - if there was an error in getting the address

getName()

public java.lang.String getName()

Get the name of the agent

Returns

the name of the agent

Throws

SQLException - if there was an error in getting the name

getProtocol()

public int getProtocol()

Get the protocol of the agent

Returns

the protocol of the agent

Throws

SQLException - if there was an error in getting the protocol

setAddress(String)

public void setAddress(java.lang.String address)

Set the address of the agent

Parameters

address - the address of the agent

Throws

SQLException - if there was an error in setting the address

setName(String)

public void setName(java.lang.String name)

Set the name of the agent

Parameters

name - the name of the agent

Throws

SQLException - if there was an error in setting the name

setProtocol(int)

public void setProtocol(int protocol)

Set the protocol of the agent

Parameters

protocol - the protocol of the agent

Throws

SQLException - if there was an error in setting the address

toString()

public java.lang.String toString()

Convert the agent to its string representation which is of the form: "[AQjmsAgent] \n name: NAME \n address: ADDRESS \n protocol: PROTOCOL"

Returns

the string representation of the agent

Throws

SQLException - if there was an error in setting the address


AQjmsBytesMessage

Syntax

public class AQjmsBytesMessage extends AQjmsMessage 
   implements javax.jms.BytesMessage
 
java.lang.Object
  |
  +--AQjmsMessage
        |
        +--oracle.jms.AQjmsBytesMessage

All Implemented Interfaces

javax.jms.BytesMessage, javax.jms.Message

Description

This class implements the BytesMessage interface. A BytesMessage is used to send a message containing a stream of uninterpreted bytes

Member Summary Description

Methods

-

clearBody()

Clear out the message body.

clearProperties()

Clear a message's properties.

readBoolean()

Read a boolean from the stream message.

readByte()

Read a signed 8-bit value from the stream message.

readBytes(byte[])

Read a byte array from the stream message.

readBytes(byte[], int)

Read a portion of the bytes message.

readChar()

Read a Unicode character value from the stream message.

readDouble()

Read a double from the stream message.

readFloat()

Read a float from the stream message.

readInt()

Read a signed 32-bit integer from the stream message.

readLong()

Read a signed 64-bit integer from the stream message.

readShort()

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

readUnsignedByte()

Read an unsigned 8-bit number from the stream message.

readUnsignedShort()

Read an unsigned 16-bit number from the stream message.

readUTF()

Read in a string that has been encoded using a modified UTF-8 format from the stream message.

reset()

Put the message in read-only mode, and reposition the stream of bytes to the beginning.

writeBoolean(boolean)

Write a boolean to the stream message as a 1-byte value.

writeByte(byte)

Write out a byte to the stream message as a 1-byte value.

writeBytes(byte[])

Write a byte array to the stream message.

writeBytes(byte, int, int)

Write a portion of a byte array to the stream message.

writeChar(char)

Write a char to the stream message as a 2-byte value, high byte first.

writeDouble(double)

Convert the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the stream message as an 8-byte quantity, high byte first.

writeFloat(float)

Convert the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the stream message as a 4-byte quantity, high byte first.

writeInt(int)

Write an int to the stream message as four bytes, high byte first.

writeLong(long)

Write a long to the stream message as eight bytes, high byte first.

writeObject(Object)

Write a Java object to the stream message.

writeShort(short)

Write a short to the stream message as two bytes, high byte first.

writeUTF(String)

Write a string to the stream message using UTF-8 encoding in a machine-independent manner.

Inherited Member Summary

Fields inherited from interface javax.jms.Message

DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE

Methods inherited from class AQjmsMessage

getBooleanProperty(String), getByteProperty(String), getDoubleProperty(String), getFloatProperty(String), getIntProperty(String), getJMSCorrelationID(), getJMSCorrelationIDAsBytes(), getJMSDeliveryMode(), getJMSDestination(), getJMSExpiration(), getJMSMessageID(), getJMSMessageIDAsBytes(), getJMSPriority(), getJMSRedelivered(), getJMSReplyTo(), getJMSTimestamp(), getJMSType(), getLongProperty(String), getObjectProperty(String), getPropertyNames(), getSenderID(), getShortProperty(String), getStringProperty(String), propertyExists(String), setBooleanProperty(String, boolean), setByteProperty(String, byte), setDoubleProperty(String, double), setFloatProperty(String, float), setIntProperty(String, int), setJMSCorrelationID(String), setJMSCorrelationIDAsBytes(byte[]), setJMSDestination(Destination), setJMSExpiration(long), setJMSMessageID(String), setJMSPriority(int), setJMSRedelivered(boolean), setJMSReplyTo(Destination), setJMSTimestamp(long), setJMSType(String), setLongProperty(String, long), setObjectProperty(String, Object), setSenderID(AQjmsAgent), setShortProperty(String, short), setStringProperty(String, String)

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

getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty


Methods

clearBody()

public void clearBody()

Clear out the message body. All other parts of the message are left untouched.

Specified By

javax.jms.Message.clearBody() in interface javax.jms.Message

Overrides

clearBody() in class AQjmsMessage

Throws

JMSException - if JMS fails to due to some internal JMS error.

clearProperties()

public void clearProperties()

Clear a message's properties.

Specified By

javax.jms.Message.clearProperties() in interface javax.jms.Message

Overrides

clearProperties() in class AQjmsMessage

Throws

JMSException - if JMS fails to clear JMS message properties due to some internal JMS error.

readBoolean()

public boolean readBoolean()

Read a boolean from the stream message.

Specified By

javax.jms.BytesMessage.readBoolean() in interface javax.jms.BytesMessage

Returns

the boolean value read.

Throws

MessageNotReadableException - if message in write-only mode.

JMSException - if JMS fails to read message due to some internal JMS error.

MessageEOFException - if end of message stream

readByte()

public byte readByte()

Read a signed 8-bit value from the stream message.

Specified By

javax.jms.BytesMessage.readByte() in interface javax.jms.BytesMessage

Returns

the next byte from the stream message as a signed 8-bit byte.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readBytes(byte[])

public int readBytes(byte[] value)

Read a byte array from the stream message.

Specified By

javax.jms.BytesMessage.readBytes(byte[]) in interface javax.jms.BytesMessage

Parameters

value - the buffer into which the data is read.

Returns

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readBytes(byte[], int)

public int readBytes(byte[] value, int length)

Read a portion of the bytes message.

Specified By

javax.jms.BytesMessage.readBytes(byte[], int) in interface javax.jms.BytesMessage

Parameters

value - the buffer into which the data is read.

length - the number of bytes to read.

Returns

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readChar()

public char readChar()

Read a Unicode character value from the stream message.

Specified By

javax.jms.BytesMessage.readChar() in interface javax.jms.BytesMessage

Returns

the next two bytes from the stream message as a Unicode character.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readDouble()

public double readDouble()

Read a double from the stream message.

Specified By

javax.jms.BytesMessage.readDouble() in interface javax.jms.BytesMessage

Returns

the next eight bytes from the stream message, interpreted as a double.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readFloat()

public float readFloat()

Read a float from the stream message.

Specified By

javax.jms.BytesMessage.readFloat() in interface javax.jms.BytesMessage

Returns

the next four bytes from the stream message, interpreted as a float.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readInt()

public int readInt()

Read a signed 32-bit integer from the stream message.

Specified By

javax.jms.BytesMessage.readInt() in interface javax.jms.BytesMessage

Returns

the next four bytes from the stream message, interpreted as an int.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readLong()

public long readLong()

Read a signed 64-bit integer from the stream message.

Specified By

javax.jms.BytesMessage.readLong() in interface javax.jms.BytesMessage

Returns

the next eight bytes from the stream message, interpreted as a long.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readShort()

public short readShort()

Put the message in read-only mode, and reposition the stream of bytes to the beginning. ThrowsMessageNotWriteableException - if message in write-only mode. JMSException - if JMS fails to read message due to some internal JMS error.

Specified By

javax.jms.BytesMessage.readShort() in interface javax.jms.BytesMessage

readUnsignedByte()

public int readUnsignedByte()

Read an unsigned 8-bit number from the stream message.

Specified By

javax.jms.BytesMessage.readUnsignedByte() in interface javax.jms.BytesMessage

Returns

the next byte from the stream message, interpreted as an unsigned 8-bit number.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readUnsignedShort()

public int readUnsignedShort()

Read an unsigned 16-bit number from the stream message.

Specified By

javax.jms.BytesMessage.readUnsignedShort() in interface javax.jms.BytesMessage

Returns

the next two bytes from the stream message, interpreted as an unsigned 16-bit integer.

Throws

MessageNotReadableException - if message in write-only mode.

MessageEOFException - if end of message stream

JMSException - if JMS fails to read message due to some internal JMS error.

readUTF()

public java.lang.String readUTF()

Read in a string that has been encoded using a modified UTF-8 format from the stream message.

Specified By

javax.jms.BytesMessage.readUTF() in interface javax.jms.BytesMessage

Returns

a Unicode string from the stream message.

Throws

MessageNotReadableException - if message in write-only mode.