Class MessageProducer

A client uses a MessageProducer object to send messages to a destination. A MessageProducer object is created by passing a Destination object to a message-producer creation method supplied by a session.

MessageProducer is the parent interface for all message producers.

A client also has the option of creating a message producer without supplying a destination. In this case, a destination must be provided with every send operation. A typical use for this kind of message producer is to send replies to requests using the request's JMSReplyTo destination.

A client can specify a default delivery mode, priority, and time to live for messages sent by a message producer. It can also specify the delivery mode, priority, and time to live for an individual message.

A client can specify a time-to-live value in milliseconds for each message it sends. This value defines a message expiration time that is the sum of the message's time-to-live and the GMT when it is sent (for transacted sends, this is the time the client sends the message, not the time the transaction is committed).

A JMS provider should do its best to expire messages accurately; however, the JMS API does not define the accuracy provided.


Constructor Summary
MessageProducer()
            A client uses a MessageProducer object to send messages to a destination.
 
Method Summary
 void close()
           Closes the message producer.
 Number getDeliveryMode()
           Gets the producer's default delivery mode.
 Destination getDestination()
           Gets the destination associated with this MessageProducer.
 boolean getDisableMessageID()
           Gets an indication of whether message IDs are disabled.
 boolean getDisableMessageTimestamp()
           Gets an indication of whether message timestamps are disabled.
 Number getPriority()
           Gets the producer's default priority.
 Number getTimeToLive()
           Gets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.
 VoidFuture send(destination, message, deliveryMode, priority, timeToLive, callback)
           Sends a message to a destination for an "unidentified" message producer, specifying the destination in the send method directly, as well as delivery mode, priority and time to live.
 void setDeliveryMode(deliveryMode)
           Sets the producer's default delivery mode.
 void setDisableMessageID(value)
           Sets whether message IDs are disabled.
 void setDisableMessageTimestamp(value)
           Sets whether message timestamps are disabled.
 void setPriority(defaultPriority)
           Sets the producer's default priority.
 void setTimeToLive(timeToLive)
           Sets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.
 
Constructor Detail

MessageProducer

MessageProducer()

Method Detail

close

void close()

getDeliveryMode

Number getDeliveryMode()

getDestination

Destination getDestination()

getDisableMessageID

boolean getDisableMessageID()

getDisableMessageTimestamp

boolean getDisableMessageTimestamp()

getPriority

Number getPriority()

getTimeToLive

Number getTimeToLive()

send

VoidFuture send(destination, message, deliveryMode, priority, timeToLive, callback)

setDeliveryMode

void setDeliveryMode(deliveryMode)

setDisableMessageID

void setDisableMessageID(value)

setDisableMessageTimestamp

void setDisableMessageTimestamp(value)

setPriority

void setPriority(defaultPriority)

setTimeToLive

void setTimeToLive(timeToLive)