org.fuin.jmsmvc4swing.jms
Class Publisher

java.lang.Object
  extended by org.fuin.jmsmvc4swing.jms.Publisher

public final class Publisher
extends Object

Publishes messages to a JMS topic.


Constructor Summary
Publisher(JmsJndiEnvironment env)
          Constructor.
 
Method Summary
 void close()
          Close the session to the JMS provider.
 boolean isClosed()
          Returns if no JMS session is active.
 boolean isOpen()
          Returns if a JMS session is active.
 void open(String topicName)
          Create a topic to publish to (Opens a session to the JMS provider).
 void publish(String methodName, Serializable data, long id, MessageType type)
          Publishes a message to the predefined topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Publisher

public Publisher(JmsJndiEnvironment env)
Constructor.

Parameters:
env - Environment to use.
Method Detail

open

public final void open(String topicName)
Create a topic to publish to (Opens a session to the JMS provider).

Parameters:
topicName - Name of the topic.

isOpen

public final boolean isOpen()
Returns if a JMS session is active.

Returns:
If a session is in use TRUE else FALSE.

isClosed

public final boolean isClosed()
Returns if no JMS session is active.

Returns:
If no session is in use TRUE else FALSE.

close

public final void close()
Close the session to the JMS provider.


publish

public final void publish(String methodName,
                          Serializable data,
                          long id,
                          MessageType type)
Publishes a message to the predefined topic.

Parameters:
methodName - Name of the method for creating the selector.
data - Data for the message.
id - Id for creating the selector.
type - Types for creating the selector.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.