MessageProducer object to send messages to a destination.
More...

Public Member Functions | |
| Close () | |
| Closes the message producer. | |
| Send (IDestination Destination, IMessage Message) | |
| Sends a message to a destination for an unidentified message producer. | |
| Send (IMessage Message) | |
Sends a message using the MessageProducer's default delivery mode, priority, and time to live. | |
| Send (IMessage Message, TJMSDeliveryMode DeliveryMode, Integer Priority, Integer TimeToLive) | |
| Sends a message to the destination, specifying delivery mode, priority, and time to live. | |
| Send (IDestination Destination, IMessage Message, TJMSDeliveryMode DeliveryMode, Integer Priority, Integer TimeToLive) | |
| Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live. | |
| SetTransformer (const IMessageTransformer Transformer) | |
| Set the message transformer. | |
Public Attributes | |
| IDestination | Destination |
| The destination associated with this MessageProducer. | |
Protected Member Functions | |
| CheckClosed () | |
| Check if the instance of this producer has been closed. | |
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.
| TBTMessageProducer::CheckClosed | ( | ) | [protected] |
Check if the instance of this producer has been closed.
| IllegalStateException |
| TBTMessageProducer::Close | ( | ) |
Closes the message producer.
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.
| JMSException | if the JMS provider fails to close the producer due to some internal error. |
| TBTMessageProducer::Send | ( | IDestination | Destination, | |
| IMessage | Message | |||
| ) |
Sends a message to a destination for an unidentified message producer.
Uses the 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.
| Destination | the destination to send this message to | |
| Message | the message to send |
| 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. | |
| UnsupportedOperationException | if a client uses this method with a MessageProducer that specified a destination at creation time. |
| TBTMessageProducer::Send | ( | IMessage | Message | ) |
Sends a message using the MessageProducer's default delivery mode, priority, and time to live.
| Message | the message to send |
| 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 a MessageProducer with an invalid destination. | |
| UnsupportedOperationException | if a client uses this method with a MessageProducer that did not specify a destination at creation time. |
| TBTMessageProducer::Send | ( | IMessage | Message, | |
| TJMSDeliveryMode | DeliveryMode, | |||
| Integer | Priority, | |||
| Integer | TimeToLive | |||
| ) |
Sends a message to the destination, specifying delivery mode, priority, and time to live.
| Message | the message to send | |
| DeliveryMode | the delivery mode to use | |
| Priority | the priority for this message | |
| TimeToLive | 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 a MessageProducer with an invalid destination. | |
| UnsupportedOperationException | if a client uses this method with a MessageProducer that did not specify a destination at creation time. |
| TBTMessageProducer::Send | ( | IDestination | Destination, | |
| IMessage | Message, | |||
| TJMSDeliveryMode | DeliveryMode, | |||
| Integer | Priority, | |||
| Integer | TimeToLive | |||
| ) |
Sends a message to a destination for an unidentified message producer, specifying 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.
| Destination | the destination to send this message to | |
| Message | the message to send | |
| DeliveryMode | the delivery mode to use | |
| Priority | the priority for this message | |
| TimeToLive | 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. | |
| UnsupportedOperationException | if a client uses this method with a MessageProducer that specified a destination at creation time. |
| TBTMessageProducer::SetTransformer | ( | const IMessageTransformer | Transformer | ) |
| IDestination TBTMessageProducer::Destination |
The destination associated with this MessageProducer.
.
SetDestination For writing