org.jboss.seam.jms
Interface TopicBuilder

All Superinterfaces:
Serializable

public interface TopicBuilder
extends Serializable

TopicBuilder is a builder pattern implementation for working with JMS Topics.

Author:
johnament

Method Summary
 TopicBuilder destination(String destination)
          Adds a destination based on JNDI location.
 TopicBuilder destination(Topic topic)
          Adds a topic to the associated destinations.
 TopicBuilder listen(MessageListener... ml)
          Adds the given MessageListeners as listeners on the associated destinations.
 TopicBuilder newBuilder()
          Creates a TopicBuilder.
 TopicBuilder send(Message m)
          Sends a JMS Message to the destinations associated.
 TopicBuilder sendMap(Map m)
          Sends a Map as a JMS Map Message to the destinations associated.
 TopicBuilder sendObject(Object obj)
          Sends an Object as a JMS Object Message to the destinations associated.
 TopicBuilder sendString(String s)
          Sends a String as a JMS TextMessage to the destinations associated.
 TopicBuilder subtopic(String subtopic)
          Denotes messages and listeners on this Topic as belonging to a subtopic.
 

Method Detail

destination

TopicBuilder destination(String destination)
Adds a destination based on JNDI location.

Parameters:
destination - jndi location.
Returns:
this TopicBuilder

destination

TopicBuilder destination(Topic topic)
Adds a topic to the associated destinations.

Parameters:
topic - the topic to add.
Returns:
this TopicBuilder.

subtopic

TopicBuilder subtopic(String subtopic)
Denotes messages and listeners on this Topic as belonging to a subtopic. subtopics are implemented as selectors on messages with String property sm_jms_subtopic

Parameters:
subtopic - The name of the subtopic.
Returns:
this TopicBuilder

sendObject

TopicBuilder sendObject(Object obj)
Sends an Object as a JMS Object Message to the destinations associated.

Parameters:
obj - the serializable Object to send.
Returns:
this TopicBuilder

send

TopicBuilder send(Message m)
Sends a JMS Message to the destinations associated.

Parameters:
m - The message to send.
Returns:
this TopicBuilder.

sendMap

TopicBuilder sendMap(Map m)
Sends a Map as a JMS Map Message to the destinations associated.

Parameters:
m - the Map to send.
Returns:
this TopicBuilder

sendString

TopicBuilder sendString(String s)
Sends a String as a JMS TextMessage to the destinations associated.

Parameters:
s - The String to send.
Returns:
this TopicBuilder.

listen

TopicBuilder listen(MessageListener... ml)
Adds the given MessageListeners as listeners on the associated destinations.

Parameters:
ml - MessageListener instances to connect to these destinations.
Returns:
this TopicBuilder

newBuilder

TopicBuilder newBuilder()
Creates a TopicBuilder. It will be associated with any active Session.

Returns:
a new TopicBuilder instance.


Copyright © 2011 Seam Framework. All Rights Reserved.