|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.fascinator.common.messaging.MessagingServices
public class MessagingServices
Messaging services
| Field Summary | |
|---|---|
static String |
ERROR_TOPIC
Error topic string |
static String |
MESSAGE_TOPIC
Message topic string |
static String |
SUBSCRIBER_QUEUE
Subscriber Queue name |
| Method Summary | |
|---|---|
static MessagingServices |
getInstance()
Get messaging service instance |
javax.jms.Connection |
newConnection()
Establish a new JMS Connection to the local broker |
javax.jms.Session |
newSession()
Establish a new JMS Session on an existing connection to the local broker |
void |
onEvent(Map<String,String> param)
To put events to subscriber queue |
void |
publishMessage(String name,
String msg)
Sends a textual message to the named topic of the local broker. |
void |
publishMessage(String brokerUrl,
String name,
String msg)
Sends a textual message to the named topic on any broker. |
void |
queueMessage(String name,
String msg)
Sends a textual message to a named JMS queue on the local broker |
void |
queueMessage(String brokerUrl,
String name,
String msg)
Sends a textual message to a named JMS queue on any broker. |
void |
release()
Closes the JMS connections. |
void |
sendMessage(String brokerUrl,
javax.jms.Destination destination,
javax.jms.TextMessage msg)
Sends a JMS message to an instantiated JMS destination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SUBSCRIBER_QUEUE
public static final String ERROR_TOPIC
public static final String MESSAGE_TOPIC
| Method Detail |
|---|
public static MessagingServices getInstance()
throws MessagingException
javax.jms.JMSException - if an error occurred starting the JMS connections
MessagingException
public javax.jms.Connection newConnection()
throws MessagingException
MessagingException - if an error occurs
public javax.jms.Session newSession()
throws MessagingException
MessagingException - if an error occurspublic void release()
public void publishMessage(String name,
String msg)
throws MessagingException
name - The topic to send tomsg - The message to send
MessagingException - If any errors occur in resolving the
destination or sending.
public void publishMessage(String brokerUrl,
String name,
String msg)
throws MessagingException
brokerUrl - The broker to send toname - The topic to send tomsg - The message to send
MessagingException - If any errors occur in resolving the
destination or sending.
public void queueMessage(String name,
String msg)
throws MessagingException
name - The queue to send tomsg - The message to send
MessagingException - If any errors occur in resolving the
destination or sending.
public void queueMessage(String brokerUrl,
String name,
String msg)
throws MessagingException
brokerUrl - The broker to send toname - The queue to send tomsg - The message to send
MessagingException - If any errors occur in resolving the
destination or sending.
public void sendMessage(String brokerUrl,
javax.jms.Destination destination,
javax.jms.TextMessage msg)
throws MessagingException
brokerUrl - The broker with an existing producer to use in sendingdestination - The destination to send tomsg - The message to send
MessagingException - If an error occurs when attempting to send
public void onEvent(Map<String,String> param)
throws MessagingException
oid - Object ideventType - type of events happenedcontext - where the event happenedjsonFile - Configuration file
MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||