org.gcube.messaging.common.producer
Class ActiveMQClient

java.lang.Object
  extended by org.gcube.messaging.common.producer.ActiveMQClient
All Implemented Interfaces:
java.lang.Runnable

public class ActiveMQClient
extends java.lang.Object
implements java.lang.Runnable

JMS Client that sends message to ActiveMQ Broker

Author:
Andrea Manzi( CERN)

Method Summary
static ActiveMQClient getSingleton()
           
 void run()
           
 void sendMessage(GCUBEMessage message, java.lang.String... selectorType)
          Sene Message using the ActiveMQ topicConnection
 void sendMessageToQueue(GCUBEMessage message)
          Sends message to a a QUEUE destination
 void setSingleton(ActiveMQClient singleton)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sendMessage

public void sendMessage(GCUBEMessage message,
                        java.lang.String... selectorType)
Sene Message using the ActiveMQ topicConnection

Parameters:
message - the GCUBEMessage to send
selectorType - the Selector value (optional)

sendMessageToQueue

public void sendMessageToQueue(GCUBEMessage message)
Sends message to a a QUEUE destination

Parameters:
message - the GCUBEMessage to send

getSingleton

public static ActiveMQClient getSingleton()

setSingleton

public void setSingleton(ActiveMQClient singleton)

run

public void run()
Specified by:
run in interface java.lang.Runnable