|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jms.AQjmsObject | +--oracle.jms.AQjmsProducer
Oracle class implementing oracle.jms.AQjmsQueueSender, oracle.jms.AQjmsTopicPublisher
AQjmsQueueSender
, AQjmsTopicPublisher
Method Summary | |
void |
close() Closes the message producer. |
int |
getDeliveryMode() Get the producer's default delivery mode. |
javax.jms.Destination |
getDestination() Gets the destination associated with this MessageProducer . |
boolean |
getDisableMessageID() Get an indication of whether message IDs are disabled. |
boolean |
getDisableMessageTimestamp() Get an indication of whether message timestamps are disabled. |
int |
getPriority() Get the producer's default priority. |
javax.jms.Queue |
getQueue() Get the queue associated with this queue sender. |
long |
getTimeToLive() Get the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system. |
javax.jms.Topic |
getTopic() Get the topic associated with this publisher. |
java.lang.String |
getTransformation() Get the transformation for the consumer |
void |
publish(javax.jms.Message message) Publish a Message to the topic |
void |
publish(javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list) Publish a Message to a specific list of recipients |
void |
publish(javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list, int deliveryMode, int priority, long timeToLive) Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live |
void |
publish(javax.jms.Message message, int deliveryMode, int priority, long timeToLive) Publish a Message to the topic specifying delivery mode, priority and time to live to the topic. |
void |
publish(javax.jms.Topic topic, javax.jms.Message message) Publish a Message to a topic for an unidentified message producer. |
void |
publish(javax.jms.Topic topic, javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list) Publish a Message to a topic by specifying a list of recipients |
void |
publish(javax.jms.Topic topic, javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list, int deliveryMode, int priority, long timeToLive) Publish a Message to a topic by specifying a list of recipients, delivery mode, priority and time to live |
void |
publish(javax.jms.Topic topic, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) Publish a Message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live. |
void |
send(javax.jms.Destination destination, javax.jms.Message message) Sends a message to a destination for an unidentified message producer. |
void |
send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live. |
void |
send(javax.jms.Message message) Send a message |
void |
send(javax.jms.Message message, int deliveryMode, int priority, long timeToLive) Send a message. |
void |
send(javax.jms.Queue queue, javax.jms.Message message) Send a message. |
void |
send(javax.jms.Queue queue, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) Send a message. |
void |
setDeliveryMode(int deliveryMode) Set the producer's default delivery mode. |
void |
setDisableMessageID(boolean value) Set whether message IDs are disabled. |
void |
setDisableMessageTimestamp(boolean value) Set whether message timestamps are disabled. |
void |
setPriority(int priority) Set the producer's default priority. |
void |
setTimeToLive(long timeToLive) Set the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system. |
void |
setTransformation(java.lang.String transformation) Set the transformation for the consumer |
Methods inherited from class oracle.jms.AQjmsObject |
checkClosed, children, finalize, getID, getParent, isOpen, localClose, preClose |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void setDisableMessageID(boolean value) throws JMSException
Since message ID's take some effort to create and increase a message's size, some JMS providers may be able to optimize message overhead if they are given a hint that message ID is not used by an application. JMS message Producers provide a hint to disable message ID. When a client sets a Producer to disable message ID they are saying that they do not depend on the value of message ID for the messages it produces. These messages must either have message ID set to null or, if the hint is ignored, messageID must be set to its normal unique value.
Message IDs are enabled by default.
setDisableMessageID
in interface MessageProducer
value
- indicates if message IDs are disabled.JMSException
- if JMS fails to set disabled message Id due to some internal error.public boolean getDisableMessageID() throws JMSException
getDisableMessageID
in interface MessageProducer
JMSException
- if JMS fails to get disabled message Id due to some internal error.public void setDisableMessageTimestamp(boolean value) throws JMSException
setDisableMessageTimestamp
in interface MessageProducer
value
- indicates if message timestamps are disabled.JMSException
- if JMS fails to set disabled message timestamp due to some internal error.public boolean getDisableMessageTimestamp() throws JMSException
getDisableMessageTimestamp
in interface MessageProducer
JMSException
- if JMS fails to get disabled message timestamp due to some internal error.public void setDeliveryMode(int deliveryMode) throws JMSException
Delivery mode is set to PERSISTENT by default.
setDeliveryMode
in interface MessageProducer
deliveryMode
- the message delivery mode for this message producer.JMSException
- if JMS fails to set delivery mode due to some internal error.MessageProducer.getDeliveryMode()
, DeliveryMode.NON_PERSISTENT
, DeliveryMode.PERSISTENT
, Message.DEFAULT_DELIVERY_MODE
public int getDeliveryMode() throws JMSException
getDeliveryMode
in interface MessageProducer
JMSException
- if JMS fails to get delivery mode due to some internal error.MessageProducer.setDeliveryMode(int)
public void setPriority(int priority) throws JMSException
Priority is set to 4, by default.
setPriority
in interface MessageProducer
priority
- the message priority for this message producer.JMSException
- if JMS fails to set priority due to some internal error.MessageProducer.getPriority()
, Message.DEFAULT_PRIORITY
public int getPriority() throws JMSException
getPriority
in interface MessageProducer
JMSException
- if JMS fails to get priority due to some internal error.MessageProducer.setPriority(int)
public void setTimeToLive(long timeToLive) throws JMSException
Time to live is set to zero by default.
setTimeToLive
in interface MessageProducer
timeToLive
- the message time to live in milliseconds; zero is unlimitedJMSException
- if JMS fails to set Time to Live due to some internal error.MessageProducer.getTimeToLive()
, Message.DEFAULT_TIME_TO_LIVE
public long getTimeToLive() throws JMSException
getTimeToLive
in interface MessageProducer
JMSException
- if JMS fails to get Time to Live due to some internal error.MessageProducer.setTimeToLive(long)
public javax.jms.Queue getQueue() throws JMSException
getQueue
in interface QueueSender
JMSException
- if JMS fails to get queue for this queue sender due to some internal error.public void setTransformation(java.lang.String transformation)
setTransformation
in interface AQjmsQueueSender
transformation
- the transformation used when getting messagesif
- the transformation could not be setpublic java.lang.String getTransformation()
getTransformation
in interface AQjmsQueueSender
if
- the transformation could not be setpublic void send(javax.jms.Message message) throws JMSException
send
in interface QueueSender
message
- The message that has to be sentJMSException
- if JMS fails to send the message due to some internal error.MessageProducer.getDeliveryMode()
, MessageProducer.getTimeToLive()
, MessageProducer.getPriority()
public void send(javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
send
in interface QueueSender
message
- The message that has to be sentdeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds)JMSException
- if JMS fails to send the message due to some internal error.public void send(javax.jms.Queue queue, javax.jms.Message message) throws JMSException
send
in interface QueueSender
queue
- The destination queue where the message has to be sent. This overrides the default queue of the Message Producer.message
- The message that has to be sentJMSException
- if JMS fails to send the message due to some internal error.MessageProducer.getDeliveryMode()
, MessageProducer.getTimeToLive()
, MessageProducer.getPriority()
public void send(javax.jms.Queue queue, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
send
in interface QueueSender
queue
- The destination queue where the message has to be sent. This overrides the default queue of the Message Producer.message
- The message that has to be sentdeliveryMode
- The message delivery mode - persistent or non_persistentpriority
- The priority of the messagetimeToLive
- the message time to live in milliseconds; zero is unlimitedJMSException
- if JMS fails to send the message due to some internal error.public javax.jms.Topic getTopic() throws JMSException
getTopic
in interface TopicPublisher
JMSException
- if JMS fails to get topic for this topic publisher due to some internal error.public void publish(javax.jms.Message message) throws JMSException
publish
in interface TopicPublisher
message
- The message to be publishedJMSException
- if JMS fails to publish the messgae due to some internal error.MessageProducer.getDeliveryMode()
, MessageProducer.getTimeToLive()
, MessageProducer.getPriority()
public void publish(javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
publish
in interface TopicPublisher
message
- The message to be publisheddeliveryMode
- The message delivery mode - persistent or non_persistentpriority
- The priority of the messagetimeToLive
- the message time to live in milliseconds; zero is unlimitedJMSException
- if JMS fails to publish the messgae due to some internal error.public void publish(javax.jms.Topic topic, javax.jms.Message message) throws JMSException
publish
in interface TopicPublisher
topic
- The topic to which to publish the message. This overrides the default topic of the Message Producermessage
- The message to be publishedJMSException
- if JMS fails to publish the messgae due to some internal error.MessageProducer.getDeliveryMode()
, MessageProducer.getTimeToLive()
, MessageProducer.getPriority()
public void publish(javax.jms.Topic topic, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
publish
in interface TopicPublisher
topic
- The topic to which to publish the message. This overrides the default topic of the Message Producermessage
- The message to be publisheddeliveryMode
- The message delivery mode - persistent or non_persistentpriority
- The priority of the messagetimeToLive
- the message time to live in milliseconds; zero is unlimitedJMSException
- if JMS fails to publish the messgae due to some internal error.public void publish(javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list) throws JMSException
publish
in interface AQjmsTopicPublisher
message
- The message to be publishedrecipient_list
- The list of recipients to which the message is published. The recipients are of type AQjmsAgent.JMSException
- if JMS fails to publish the mesasge due to some internal error.public void publish(javax.jms.Topic topic, javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list) throws JMSException
publish
in interface AQjmsTopicPublisher
topic
- The topic to which to publish the message. This overrides the default topic of the Message Producermessage
- The message to be publishedrecipient_list
- The list of recipients to which the message is published. The recipients are of type AQjmsAgent.JMSException
- if JMS fails to publish the messgae due to some internal error.public void publish(javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list, int deliveryMode, int priority, long timeToLive) throws JMSException
publish
in interface AQjmsTopicPublisher
message
- The message to be publishedrecipient_list
- The list of recipients to which the message is published. The recipients are of type AQjmsAgent.deliveryMode
- The delivery mode - perisistent or non_persistentpriority
- The priority of the messagetimeToLive
- the message time to live in milliseconds; zero is unlimitedJMSException
- if JMS fails to publish the messgae due to some internal error.public void publish(javax.jms.Topic topic, javax.jms.Message message, oracle.jms.AQjmsAgent[] recipient_list, int deliveryMode, int priority, long timeToLive) throws JMSException
publish
in interface AQjmsTopicPublisher
topic
- The topic to which to publish the message. This overrides the default topic of the Message Producermessage
- The message to be publishedrecipient_list
- The list of recipients to which the message is published. The recipients are of type AQjmsAgent.deliveryMode
- The delivery mode - perisistent or non_persistentpriority
- The priority of the messagetimeToLive
- the message time to live in milliseconds; zero is unlimitedJMSException
- if JMS fails to publish the messgae due to some internal error.public void close() throws JMSException
MessageProducer
Since a provider may allocate some resources on behalf of a MessageProducer
outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
close
in interface MessageProducer
close
in class oracle.jms.AQjmsObject
JMSException
- if the JMS provider fails to close the producer due to some internal error.public javax.jms.Destination getDestination() throws JMSException
MessageProducer
.getDestination
in interface MessageProducer
Destination/
JMSException
- if the JMS provider fails to get the destination for this MessageProducer
due to some internal error.public void send(javax.jms.Destination destination, javax.jms.Message message) throws JMSException
MessageProducer
's default delivery mode, priority, and time to live.
Typically, a message producer is assigned a destination at creation time; however, the JMS API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.
send
in interface MessageProducer
destination
- the destination to send this message tomessage
- the message to sendJMSException
- if the JMS provider fails to send the message due to some internal error.MessageFormatException
- if an invalid message is specified.InvalidDestinationException
- if a client uses this method with an invalid destination.java.lang.UnsupportedOperationException
- if a client uses this method with a MessageProducer
that specified a destination at creation time.Session.createProducer(javax.jms.Destination)
, MessageProducer
public void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
Typically, a message producer is assigned a destination at creation time; however, the JMS API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.
send
in interface MessageProducer
destination
- the destination to send this message tomessage
- the message to senddeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds)JMSException
- if the JMS provider fails to send the message due to some internal error.MessageFormatException
- if an invalid message is specified.InvalidDestinationException
- if a client uses this method with an invalid destination.Session.createProducer(javax.jms.Destination)
|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |