public class JmsEventService extends Object implements EventService
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_JMS_PASSWORD
The configuration key controlling the JMS password.
|
static String |
CONFIG_JMS_QUEUE_NAME
The configuration key controlling the JMS queue name.
|
static String |
CONFIG_JMS_URL
The configuration key controlling the JMS broker URL.
|
static String |
CONFIG_JMS_USE_QUEUE
The configuration key controlling whether to use a topic or queue.
|
static String |
CONFIG_JMS_USERNAME
The configuration key controlling the JMS username.
|
Constructor and Description |
---|
JmsEventService()
Create a new JMS Publisher.
|
JmsEventService(EventSerializationService serializer,
Connection conn)
Create a new JMS Publisher.
|
JmsEventService(EventSerializationService serializer,
Session session,
String queueName)
Create a new JMS Publisher.
|
JmsEventService(EventSerializationService serializer,
Session session,
String queueName,
boolean useQueue)
Create a new JMS Publisher.
|
public static final String CONFIG_JMS_QUEUE_NAME
public static final String CONFIG_JMS_URL
public static final String CONFIG_JMS_USERNAME
public static final String CONFIG_JMS_PASSWORD
public static final String CONFIG_JMS_USE_QUEUE
public JmsEventService()
@Inject public JmsEventService(EventSerializationService serializer, Connection conn) throws JMSException
serializer
- the event serializerconn
- the connectionJMSException
- when there is a connection errorpublic JmsEventService(EventSerializationService serializer, Session session, String queueName) throws JMSException
serializer
- the event serializersession
- the JMS sessionqueueName
- the name of the queueJMSException
- when there is a connection errorpublic JmsEventService(EventSerializationService serializer, Session session, String queueName, boolean useQueue) throws JMSException
serializer
- the event serializersession
- the JMS sessionqueueName
- the name of the queueuseQueue
- whether to use a queue or a topicJMSException
- when there is a connection errorpublic void emit(Event event)
EventService
emit
in interface EventService
event
- the event