
org.fcrepo.jms.JMSTopicPublisher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fcrepo-jms Show documentation
Show all versions of fcrepo-jms Show documentation
The Fedora Commons repository JMS module: Provides repository event publication via Java Message Service.
The newest version!
/*
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree.
*/
package org.fcrepo.jms;
import javax.jms.Destination;
import javax.jms.JMSException;
/**
* Machinery to publish JMS messages when an EventBus
* message is received.
*
* @author barmintor
* @author awoods
*/
public class JMSTopicPublisher extends AbstractJMSPublisher {
private final String topicName;
/**
* Create a JMS Topic with the default name of "fedora"
*/
public JMSTopicPublisher() {
this("fedora");
}
/**
* Create a JMS Topic with a configurable name
*
* @param topicName the name of the topic
*/
public JMSTopicPublisher(final String topicName) {
this.topicName = topicName;
}
protected Destination createDestination() throws JMSException {
return jmsSession.createTopic(topicName);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy