public class SQSMessageProducer
extends java.lang.Object
A client also has the option of creating a message producer without supplying a queue destination. In this case, a destination must be provided with every send operation.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the message producer.
|
int |
getDeliveryMode()
This method is not supported.
|
Destination |
getDestination()
Gets the destination associated with this MessageProducer.
|
boolean |
getDisableMessageID()
This method is not supported.
|
boolean |
getDisableMessageTimestamp()
This method is not supported.
|
int |
getPriority()
This method is not supported.
|
Queue |
getQueue() |
long |
getTimeToLive()
This method is not supported.
|
void |
send(Destination destination,
Message message)
Sends a message to a queue destination.
|
void |
send(Destination destination,
Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to a queue destination.
|
void |
send(Message message)
Sends a message to a destination created during the creation time of this
message producer.
|
void |
send(Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to a destination created during the creation time of this
message producer.
|
void |
send(Queue queue,
Message message)
Sends a message to a queue.
|
void |
send(Queue queue,
Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to a queue.
|
void |
setDeliveryMode(int deliveryMode)
This method is not supported.
|
void |
setDisableMessageID(boolean value)
This method is not supported.
|
void |
setDisableMessageTimestamp(boolean value)
This method is not supported.
|
void |
setPriority(int defaultPriority)
This method is not supported.
|
void |
setTimeToLive(long timeToLive)
This method is not supported.
|
public Queue getQueue()
throws JMSException
JMSExceptionpublic void send(Queue queue,
Message message)
throws JMSException
queue - the queue destination to send this message tomessage - the message to sendInvalidDestinationException - If a client uses this method with a destination other than
SQS queue destination.MessageFormatException - If an invalid message is specified.java.lang.UnsupportedOperationException - If a client uses this method with a MessageProducer that
specified a destination at creation time.JMSException - If session is closed or internal error.public void send(Queue queue,
Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
Send does not support deliveryMode, priority, and timeToLive. It will ignore anything in deliveryMode, priority, and timeToLive.
queue - the queue destination to send this message tomessage - the message to senddeliveryMode - priority - timeToLive - InvalidDestinationException - If a client uses this method with a destination other than
SQS queue destination.MessageFormatException - If an invalid message is specified.java.lang.UnsupportedOperationException - If a client uses this method with a MessageProducer that
specified a destination at creation time.JMSException - If session is closed or internal error.public Destination getDestination()
throws JMSException
JMSExceptionpublic void close()
throws JMSException
JMSExceptionpublic void send(Message message)
throws JMSException
message - the message to sendMessageFormatException - If an invalid message is specified.java.lang.UnsupportedOperationException - If a client uses this method with a MessageProducer that did
not specify a destination at creation time.JMSException - If session is closed or internal error.public void send(Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
Send does not support deliveryMode, priority, and timeToLive. It will ignore anything in deliveryMode, priority, and timeToLive.
message - the message to senddeliveryMode - priority - timeToLive - MessageFormatException - If an invalid message is specified.java.lang.UnsupportedOperationException - If a client uses this method with a MessageProducer that did
not specify a destination at creation time.JMSException - If session is closed or internal error.public void send(Destination destination,
Message message)
throws JMSException
destination - the queue destination to send this message tomessage - the message to sendInvalidDestinationException - If a client uses this method with a destination other than
valid SQS queue destination.MessageFormatException - If an invalid message is specified.java.lang.UnsupportedOperationException - If a client uses this method with a MessageProducer that
specified a destination at creation time.JMSException - If session is closed or internal error.public void send(Destination destination,
Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
Send does not support deliveryMode, priority, and timeToLive. It will ignore anything in deliveryMode, priority, and timeToLive.
destination - the queue destination to send this message tomessage - the message to senddeliveryMode - priority - timeToLive - InvalidDestinationException - If a client uses this method with a destination other than
valid SQS queue destination.MessageFormatException - If an invalid message is specified.java.lang.UnsupportedOperationException - If a client uses this method with a MessageProducer that
specified a destination at creation time.JMSException - If session is closed or internal error.public void setDisableMessageID(boolean value)
throws JMSException
JMSExceptionpublic boolean getDisableMessageID()
throws JMSException
JMSExceptionpublic void setDisableMessageTimestamp(boolean value)
throws JMSException
JMSExceptionpublic boolean getDisableMessageTimestamp()
throws JMSException
JMSExceptionpublic void setDeliveryMode(int deliveryMode)
throws JMSException
JMSExceptionpublic int getDeliveryMode()
throws JMSException
JMSExceptionpublic void setPriority(int defaultPriority)
throws JMSException
JMSExceptionpublic int getPriority()
throws JMSException
JMSExceptionpublic void setTimeToLive(long timeToLive)
throws JMSException
JMSExceptionpublic long getTimeToLive()
throws JMSException
JMSException