| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.j_spaces.jms.GSMessageProducerImpl
public class GSMessageProducerImpl
GigaSpaces implementation of the javax.jms.MessageProducer
 interface.
 
 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 m_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).
TopicPublisher, 
QueueSender, 
Session.createProducer(javax.jms.Destination)| Constructor Summary | |
|---|---|
GSMessageProducerImpl(GSSessionImpl sess,
                      Destination m_dest,
                      IMessageConverter messageConverter)
 | 
|
| Method Summary | |
|---|---|
 void | 
close()
Cancels the AckDataEntry notify delegator, using its Lease.cancel() Also it removes the current producer from the producers list held by the m_session.  | 
 int | 
getDeliveryMode()
 | 
 Destination | 
getDestination()
 | 
 boolean | 
getDisableMessageID()
 | 
 boolean | 
getDisableMessageTimestamp()
 | 
 int | 
getPriority()
 | 
 String | 
getProducerID()
 | 
 Queue | 
getQueue()
 | 
 long | 
getTimeToLive()
 | 
 Topic | 
getTopic()
 | 
 void | 
publish(Message message)
 | 
 void | 
publish(Message message,
        int deliveryMode,
        int priority,
        long timeToLive)
 | 
 void | 
publish(Topic topic,
        Message message)
 | 
 void | 
publish(Topic topic,
        Message message,
        int deliveryMode,
        int priority,
        long timeToLive)
 | 
 void | 
send(Destination destination,
     Message message)
 | 
 void | 
send(Destination _destination,
     Message _message,
     int _deliveryMode,
     int _priority,
     long _timeToLive)
Sends a message with given delivery parameters for an unidentified message producer.  | 
 void | 
send(Message message)
 | 
 void | 
send(Message message,
     int deliveryMode,
     int priority,
     long timeToLive)
 | 
 void | 
send(Queue queue,
     Message message)
 | 
 void | 
send(Queue queue,
     Message message,
     int deliveryMode,
     int priority,
     long timeToLive)
 | 
 void | 
setDeliveryMode(int deliveryMode)
Sets the messages DeliveryMode for all the messages which will be sent via this producer in the m_session level. available DeliveryModes are: DeliveryMode.PERSISTENT - the default and DeliveryMode.NON_PERSISTENT  | 
 void | 
setDisableMessageID(boolean value)
 | 
 void | 
setDisableMessageTimestamp(boolean value)
 | 
 void | 
setPriority(int priority)
Sets the priority for all the messages which be sent via this producer in the m_session level.  | 
 void | 
setProducerID(String m_producerID)
 | 
 void | 
setTimeToLive(long timeToLive)
Sets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.  | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public GSMessageProducerImpl(GSSessionImpl sess,
                             Destination m_dest,
                             IMessageConverter messageConverter)
                      throws JMSException
sess - - The Session the producer belongs tom_dest - - The destination (Queue or Topic) that the producer sends messages tom_producerID - 
JMSException| Method Detail | 
|---|
public void setDisableMessageID(boolean value)
                         throws JMSException
setDisableMessageID in interface MessageProducerJMSExceptionMessageProducer.setDisableMessageID(boolean)
public boolean getDisableMessageID()
                            throws JMSException
getDisableMessageID in interface MessageProducerJMSExceptionMessageProducer.getDisableMessageID()
public void setDisableMessageTimestamp(boolean value)
                                throws JMSException
setDisableMessageTimestamp in interface MessageProducerJMSExceptionMessageProducer.setDisableMessageTimestamp(boolean)public void setProducerID(String m_producerID)
public boolean getDisableMessageTimestamp()
                                   throws JMSException
getDisableMessageTimestamp in interface MessageProducerJMSExceptionMessageProducer.getDisableMessageTimestamp()
public void setDeliveryMode(int deliveryMode)
                     throws JMSException
setDeliveryMode in interface MessageProducerJMSExceptionMessageProducer.setDeliveryMode(int)
public int getDeliveryMode()
                    throws JMSException
getDeliveryMode in interface MessageProducerJMSExceptionMessageProducer.getDeliveryMode()
public void setPriority(int priority)
                 throws JMSException
setPriority in interface MessageProducerJMSExceptionMessageProducer.setPriority(int)
public int getPriority()
                throws JMSException
getPriority in interface MessageProducerJMSExceptionMessageProducer.getPriority()
public void setTimeToLive(long timeToLive)
                   throws JMSException
Time to live is set to zero by default.
setTimeToLive in interface MessageProducertimeToLive - the message time to live in milliseconds; zero is unlimited,
            while then it is calculated according to the space ttl
            Lease.Forever which is Long.max_value
JMSException - if the JMS provider fails to set the time to live due to
                some internal error.MessageProducer.getTimeToLive(), 
Message.DEFAULT_TIME_TO_LIVE
public long getTimeToLive()
                   throws JMSException
getTimeToLive in interface MessageProducerJMSExceptionMessageProducer.getTimeToLive()
public Destination getDestination()
                           throws JMSException
getDestination in interface MessageProducerJMSExceptionMessageProducer.getDestination()
public void close()
           throws JMSException
close in interface MessageProducerJMSExceptionMessageProducer.close()
public void send(Message message)
          throws JMSException
send in interface MessageProducersend in interface QueueSenderJMSExceptionMessageProducer.send(javax.jms.Message)
public void send(Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws JMSException
send in interface MessageProducersend in interface QueueSenderJMSExceptionMessageProducer.send(javax.jms.Message, int, int, long)
public void send(Destination destination,
                 Message message)
          throws JMSException
send in interface MessageProducerJMSExceptionMessageProducer.send(javax.jms.Destination,
      javax.jms.Message)
public void send(Destination _destination,
                 Message _message,
                 int _deliveryMode,
                 int _priority,
                 long _timeToLive)
          throws JMSException
send in interface MessageProducerUnsupportedOperationException - When the producer did not properly identify itself.
JMSSecurityException - If the user if not a WRITER on the specified destination.
IllegalStateException - If the producer is m_closed, or if the connection is
                broken.
JMSException - If the request fails for any other reason.MessageProducer.send(javax.jms.Destination,
      javax.jms.Message, int, int, long)public String toString()
toString in class Objectpublic String getProducerID()
public Queue getQueue()
               throws JMSException
getQueue in interface QueueSenderJMSExceptionQueueSender.getQueue()
public void send(Queue queue,
                 Message message)
          throws JMSException
send in interface QueueSenderJMSExceptionQueueSender.send(javax.jms.Queue, javax.jms.Message)
public void send(Queue queue,
                 Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws JMSException
send in interface QueueSenderJMSExceptionQueueSender.send(javax.jms.Queue, javax.jms.Message, int, int, long)
public Topic getTopic()
               throws JMSException
getTopic in interface TopicPublisherJMSExceptionTopicPublisher.getTopic()
public void publish(Message message)
             throws JMSException
publish in interface TopicPublisherJMSExceptionMessageProducer.send(javax.jms.Message)
public void publish(Topic topic,
                    Message message)
             throws JMSException
publish in interface TopicPublisherJMSExceptionjavax.jms.TopicPublisher#send(javax.jms.Topic, javax.jms.Message)
public void publish(Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
publish in interface TopicPublisherJMSExceptionMessageProducer.send(javax.jms.Message, int, int, long)
public void publish(Topic topic,
                    Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
publish in interface TopicPublisherJMSExceptionjavax.jms.TopicPublisher#send(javax.jms.Topic, javax.jms.Message, int, int, long)
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||