|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageManager
The MessageBuilder interface defines an abstraction layer over the JMS APIs You can instances of this interface to create and send JMS Messages outbound.
Method Summary | |
---|---|
BytesMessage |
createBytesMessage(byte[] bytes)
Creates a bytes message based on the byte[] payload |
JmsMessage |
createJmsMessage(Class<?> payloadType,
Object payload)
|
MapMessage |
createMapMessage(Map<Object,Object> map)
Creates a MapMessage based on the Map payload provided. |
MessageConsumer |
createMessageConsumer(Destination destination,
MessageListener... listeners)
Creates a new MessageConsumer that will be managed by the used session |
MessageConsumer |
createMessageConsumer(Destination destination,
String selector,
MessageListener... listeners)
|
MessageConsumer |
createMessageConsumer(String destination,
MessageListener... listeners)
Creates a new MessageConsumer that will be managed by the used session |
MessageConsumer |
createMessageConsumer(String destination,
String selector,
MessageListener... listeners)
|
MessageProducer |
createMessageProducer(String destination)
Creates a new MessageProducer that will be managed by the used session |
ObjectMessage |
createObjectMessage(Object object)
Creates an object message based on the object payload provided. |
QueueBuilder |
createQueueBuilder()
Creates a QueueBuilder, simple interface for working with Queues |
QueueReceiver |
createQueueReceiver(String destination,
MessageListener... listeners)
Creates a new QueueReceiver that will be managed by the used session |
QueueSender |
createQueueSender(Queue queue)
Creates a QueueSender for the given queue. |
QueueSender |
createQueueSender(String destination)
Creates a QueueSender for the given queue. |
TextMessage |
createTextMessage(String string)
Creates a text message based on the String payload provided. |
TopicBuilder |
createTopicBuilder()
Creates a TopicBuilder, simple interface for working with Topics. |
TopicPublisher |
createTopicPublisher(String destination)
Creates a TopicPublisher for the given topic. |
TopicPublisher |
createTopicPublisher(Topic topic)
Creates a TopicPublisher for the given topic. |
TopicSubscriber |
createTopicSubscriber(Destination destination,
String selector,
MessageListener... listeners)
|
TopicSubscriber |
createTopicSubscriber(String destination,
MessageListener... listeners)
Creates a new TopicSubscriber that will be managed by the used session |
TopicSubscriber |
createTopicSubscriber(String destination,
String selector,
MessageListener... listeners)
|
Session |
getSession()
Exposes the underlying Session for public usage. |
Destination |
lookupDestination(String jndiName)
|
void |
sendBytesToDestinations(byte[] bytes,
Destination... destinations)
Wrapper method for creating bytes message, then sending it to listed destinations. |
void |
sendBytesToDestinations(byte[] bytes,
String... destinations)
Sends a bytep[ (as an BytesMessage ) to listed destinations. |
void |
sendMapToDestinations(Map map,
Destination... destinations)
Wrapper method for creating map message, then sending it to listed destinations. |
void |
sendMapToDestinations(Map map,
String... destinations)
Sends a map (as an MapMessage ) to listed destinations. |
void |
sendMessage(Message message,
Destination... destinations)
Sends the given message to the list of destinations. |
void |
sendMessage(Message message,
String... destinations)
Utility methods for sending messages to a set of Strings that are the destinations |
void |
sendObjectToDestinations(Object object,
Destination... destinations)
Wrapper method for creating object message, then sending it to listed destinations. |
void |
sendObjectToDestinations(Object object,
String... destinations)
Sends an object (as an ObjectMessage ) to listed destinations. |
void |
sendTextToDestinations(String string,
Destination... destinations)
Wrapper method for creating text message, then sending it to listed destinations. |
void |
sendTextToDestinations(String string,
String... destinations)
Sends a string (as an TextMessage ) to listed destinations. |
Method Detail |
---|
ObjectMessage createObjectMessage(Object object)
object
- Object to use as payload.
TextMessage createTextMessage(String string)
string
- the payload
MapMessage createMapMessage(Map<Object,Object> map)
map
- the payload
BytesMessage createBytesMessage(byte[] bytes)
bytes
- the bytes to be written.
void sendMessage(Message message, String... destinations)
message
- The message to be sent.destinations
- A sequence of JNDI names representing the destinations to distribute to.void sendObjectToDestinations(Object object, String... destinations)
ObjectMessage
) to listed destinations.
object
- Payload of the object message.destinations
- A sequence of JNDI names representing the destinations to distribute to.void sendTextToDestinations(String string, String... destinations)
TextMessage
) to listed destinations.
string
- Payload of the text message.destinations
- A sequence of JNDI names representing the destinations to distribute to.void sendMapToDestinations(Map map, String... destinations)
MapMessage
) to listed destinations.
map
- Payload of the map message.destinations
- A sequence of JNDI names representing the destinations to distribute to.void sendBytesToDestinations(byte[] bytes, String... destinations)
BytesMessage
) to listed destinations.
bytes
- Payload of the bytes message.destinations
- A sequence of JNDI names representing the destinations to distribute to.void sendMessage(Message message, Destination... destinations)
message
- The message to be sent.destinations
- an array of destinations to be sent to.void sendObjectToDestinations(Object object, Destination... destinations)
object
- the object to be sent as an object message.destinations
- destinations to be sent to.void sendTextToDestinations(String string, Destination... destinations)
string
- the string data to be sent.destinations
- destinations to be sent to.void sendMapToDestinations(Map map, Destination... destinations)
map
- the map object to be sent.destinations
- destinations to be sent to.void sendBytesToDestinations(byte[] bytes, Destination... destinations)
bytes
- the stream data to be sent.destinations
- destinations to be sent to.Session getSession()
Session
for public usage.
MessageProducer createMessageProducer(String destination)
destination
- JNDI Location of Destination in use
TopicPublisher createTopicPublisher(String destination)
destination
- JNDI Location of Destination in use
TopicPublisher createTopicPublisher(Topic topic)
destination
- JNDI Location of Destination in use
TopicBuilder createTopicBuilder()
QueueBuilder createQueueBuilder()
QueueSender createQueueSender(String destination)
destination
- JNDI Location of Destination in use
QueueSender createQueueSender(Queue queue)
destination
- JNDI Location of Destination in use
MessageConsumer createMessageConsumer(String destination, MessageListener... listeners)
destination
- JNDI Location of Destination in uselisteners
- optional list of MessageListeners that will be bound to the consumer.
MessageConsumer createMessageConsumer(Destination destination, MessageListener... listeners)
destination
- JNDI Location of Destination in uselisteners
- optional list of MessageListeners that will be bound to the consumer.
TopicSubscriber createTopicSubscriber(String destination, MessageListener... listeners)
destination
- JNDI Location of Topic in uselisteners
- optional list of MessageListeners that will be bound to the subscriber.
QueueReceiver createQueueReceiver(String destination, MessageListener... listeners)
destination
- JNDI Location of Queue in uselisteners
- optional list of MessageListeners that will be bound to the receiver.
MessageConsumer createMessageConsumer(Destination destination, String selector, MessageListener... listeners)
MessageConsumer createMessageConsumer(String destination, String selector, MessageListener... listeners)
TopicSubscriber createTopicSubscriber(String destination, String selector, MessageListener... listeners)
TopicSubscriber createTopicSubscriber(Destination destination, String selector, MessageListener... listeners)
Destination lookupDestination(String jndiName)
JmsMessage createJmsMessage(Class<?> payloadType, Object payload)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |