org.objectweb.joram.client.jms
Class MessageProducer

java.lang.Object
  extended byorg.objectweb.joram.client.jms.MessageProducer
All Implemented Interfaces:
javax.jms.MessageProducer
Direct Known Subclasses:
QueueSender, TopicPublisher

public class MessageProducer
extends java.lang.Object
implements javax.jms.MessageProducer

Implements the javax.jms.MessageProducer interface.


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()
          API method.
 int getDeliveryMode()
          API method.
 javax.jms.Destination getDestination()
          API method.
 boolean getDisableMessageID()
          API method.
 boolean getDisableMessageTimestamp()
          API method.
 int getPriority()
          API method.
 long getTimeToLive()
          API method.
 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)
          API method.
 void setDisableMessageID(boolean value)
          API method; not taken into account.
 void setDisableMessageTimestamp(boolean value)
          API method.
 void setPriority(int priority)
          API method.
 void setTimeToLive(long timeToLive)
          API method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

closed

protected boolean closed
true if the producer is closed.


sess

protected Session sess
The session the producer belongs to.


dest

protected Destination dest
The destination the producer sends messages to.

Method Detail

setDisableMessageID

public void setDisableMessageID(boolean value)
                         throws javax.jms.JMSException
API method; not taken into account.

Specified by:
setDisableMessageID in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

setDeliveryMode

public void setDeliveryMode(int deliveryMode)
                     throws javax.jms.JMSException
API method.

Specified by:
setDeliveryMode in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException - When setting an invalid delivery mode.

setPriority

public void setPriority(int priority)
                 throws javax.jms.JMSException
API method.

Specified by:
setPriority in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException - When setting an invalid priority.

setTimeToLive

public void setTimeToLive(long timeToLive)
                   throws javax.jms.JMSException
API method.

Specified by:
setTimeToLive in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

setDisableMessageTimestamp

public void setDisableMessageTimestamp(boolean value)
                                throws javax.jms.JMSException
API method.

Specified by:
setDisableMessageTimestamp in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

getDestination

public javax.jms.Destination getDestination()
                                     throws javax.jms.JMSException
API method.

Specified by:
getDestination in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

getDisableMessageID

public boolean getDisableMessageID()
                            throws javax.jms.JMSException
API method.

Specified by:
getDisableMessageID in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

getDeliveryMode

public int getDeliveryMode()
                    throws javax.jms.JMSException
API method.

Specified by:
getDeliveryMode in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

getPriority

public int getPriority()
                throws javax.jms.JMSException
API method.

Specified by:
getPriority in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

getTimeToLive

public long getTimeToLive()
                   throws javax.jms.JMSException
API method.

Specified by:
getTimeToLive in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

getDisableMessageTimestamp

public boolean getDisableMessageTimestamp()
                                   throws javax.jms.JMSException
API method.

Specified by:
getDisableMessageTimestamp in interface javax.jms.MessageProducer
Throws:
javax.jms.IllegalStateException - If the producer is closed.
javax.jms.JMSException

send

public void send(javax.jms.Message message)
          throws javax.jms.JMSException
Sends a message with the default delivery parameters.

Specified by:
send in interface javax.jms.MessageProducer
Throws:
java.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.

send

public void send(javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws javax.jms.JMSException
Sends a message with given delivery parameters.

Specified by:
send in interface javax.jms.MessageProducer
Throws:
java.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.

send

public void send(javax.jms.Destination dest,
                 javax.jms.Message message)
          throws javax.jms.JMSException
Sends a message with default delivery parameters for an unidentified message producer.

Specified by:
send in interface javax.jms.MessageProducer
Throws:
java.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.

send

public void send(javax.jms.Destination dest,
                 javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws javax.jms.JMSException
Sends a message with given delivery parameters for an unidentified message producer.

Specified by:
send in interface javax.jms.MessageProducer
Throws:
java.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.

close

public void close()
           throws javax.jms.JMSException
API method.

Specified by:
close in interface javax.jms.MessageProducer
Throws:
javax.jms.JMSException - Actually never thrown.


Copyright ? 2004 Scalagent - All rights reserved