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 connectionFactory(ConnectionFactory connectionFactory)
          Specifies the ConnectionFactory to use.
 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(Serializable 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 sessionMode(int sessionMode)
          Sets the session mode for this Builder.
 TopicBuilder subtopic(String subtopic)
          Denotes messages and listeners on this Topic as belonging to a subtopic.
 TopicBuilder transacted()
          Toggles the transacted state (default is false) for this builder.
 

Method Detail

transacted

TopicBuilder transacted()
Toggles the transacted state (default is false) for this builder.

Returns:
this Builder.

sessionMode

TopicBuilder sessionMode(int sessionMode)
Sets the session mode for this Builder. Default is Session.AUTO_ACKNOWLEDGE

Parameters:
sessionMode - SessionMode flag, see javax.jms.Session's list of valid values.
Returns:
this Builder.

connectionFactory

TopicBuilder connectionFactory(ConnectionFactory connectionFactory)
Specifies the ConnectionFactory to use.

Parameters:
ConnectionFactory - to use.
Returns:
this QueueBuilder.

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(Serializable 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.