|
Joram 5.2.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.objectweb.joram.client.jms.MessageProducer
public class MessageProducer
Implements the javax.jms.MessageProducer interface.
A client uses a MessageProducer object to send messages to a destination.
A MessageProducer object is created by calling the createProducer method on
the session object. A message producer is normally dedicated to a unique
destination.
A client also has the option of creating a message producer without
supplying a unique destination. In this case, a destination must be
provided with every send operation.
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 each individual message.
| Field Summary | |
|---|---|
protected boolean |
closed
true if the producer is closed. |
protected Destination |
dest
The destination the producer sends messages to. |
protected Session |
sess
The session the producer belongs to. |
| Method Summary | |
|---|---|
void |
close()
Closes the message producer. |
int |
getDeliveryMode()
Gets the producer's default delivery mode. |
javax.jms.Destination |
getDestination()
Gets the destination associated with this MessageProducer. |
boolean |
getDisableMessageID()
API method. |
boolean |
getDisableMessageTimestamp()
API method. |
int |
getPriority()
Gets the producer's default priority. |
long |
getTimeToLive()
Gets the default duration in milliseconds that a produced message should be retained by the provider. |
void |
send(javax.jms.Destination dest,
javax.jms.Message message)
Sends a message with default delivery parameters for an unidentified message producer. |
void |
send(javax.jms.Destination dest,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message with given delivery parameters for an unidentified message producer. |
void |
send(javax.jms.Message message)
Sends a message with the default delivery parameters. |
void |
send(javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message with given delivery parameters. |
void |
setDeliveryMode(int deliveryMode)
Sets the producer's default delivery mode. |
void |
setDisableMessageID(boolean value)
API method; not taken into account. |
void |
setDisableMessageTimestamp(boolean value)
API method. |
void |
setPriority(int priority)
Sets the producer's default priority. |
void |
setTimeToLive(long timeToLive)
Sets the default duration of time in milliseconds that a produced message should be retained by the provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean closed
true if the producer is closed.
protected Session sess
protected Destination dest
| Method Detail |
|---|
public void setDisableMessageID(boolean value)
throws javax.jms.JMSException
setDisableMessageID in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public void setDeliveryMode(int deliveryMode)
throws javax.jms.JMSException
setDeliveryMode in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException - When setting an invalid delivery mode.
public void setPriority(int priority)
throws javax.jms.JMSException
setPriority in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException - When setting an invalid priority.
public void setTimeToLive(long timeToLive)
throws javax.jms.JMSException
setTimeToLive in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public void setDisableMessageTimestamp(boolean value)
throws javax.jms.JMSException
setDisableMessageTimestamp in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public javax.jms.Destination getDestination()
throws javax.jms.JMSException
getDestination in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public boolean getDisableMessageID()
throws javax.jms.JMSException
getDisableMessageID in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public int getDeliveryMode()
throws javax.jms.JMSException
getDeliveryMode in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public int getPriority()
throws javax.jms.JMSException
getPriority in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public long getTimeToLive()
throws javax.jms.JMSException
getTimeToLive in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public boolean getDisableMessageTimestamp()
throws javax.jms.JMSException
getDisableMessageTimestamp in interface javax.jms.MessageProducerjavax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException
public void send(javax.jms.Message message)
throws javax.jms.JMSException
send in interface javax.jms.MessageProducerjava.lang.UnsupportedOperationException - If the dest is unidentified.
javax.jms.IllegalStateException - If the producer is closed, or if the
connection is broken.
javax.jms.JMSException - If the request fails for any other reason.
public void send(javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws javax.jms.JMSException
send in interface javax.jms.MessageProducerjava.lang.UnsupportedOperationException - If the dest is unidentified.
javax.jms.IllegalStateException - If the producer is closed, or if the
connection is broken.
javax.jms.JMSException - If the request fails for any other reason.
public void send(javax.jms.Destination dest,
javax.jms.Message message)
throws javax.jms.JMSException
send in interface javax.jms.MessageProducerjava.lang.UnsupportedOperationException - When the producer did not
properly identify itself.
JMSSecurityException - If the user if not a WRITER on the
specified destination.
javax.jms.IllegalStateException - If the producer is closed, or if the
connection is broken.
javax.jms.JMSException - If the request fails for any other reason.
public void send(javax.jms.Destination dest,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws javax.jms.JMSException
send in interface javax.jms.MessageProducerjava.lang.UnsupportedOperationException - When the producer did not
properly identify itself.
JMSSecurityException - If the user if not a WRITER on the
specified destination.
javax.jms.IllegalStateException - If the producer is closed, or if the
connection is broken.
javax.jms.JMSException - If the request fails for any other reason.
public void close()
throws javax.jms.JMSException
close in interface javax.jms.MessageProducerjavax.jms.JMSException - Actually never thrown.
|
Joram 5.2.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||