Package org.apache.storm.jms.example
Class SpringJmsProvider
- java.lang.Object
-
- org.apache.storm.jms.example.SpringJmsProvider
-
- All Implemented Interfaces:
Serializable,JmsProvider
public class SpringJmsProvider extends Object implements JmsProvider
AJmsProviderthat uses the spring framework to obtain a JMSConnectionFactoryandDesitnationobjects.The constructor takes three arguments:
- A string pointing to the the spring application context file contining the JMS configuration (must be on the classpath)
- The name of the connection factory bean
- The name of the destination bean
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpringJmsProvider(String appContextClasspathResource, String connectionFactoryBean, String destinationBean)Constructs aSpringJmsProviderobject given the name of a classpath resource (the spring application context file), and the bean names of a JMS connection factory and destination.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jms.ConnectionFactoryconnectionFactory()Provides the JMSConnectionFactory.javax.jms.Destinationdestination()Provides theDestination(topic or queue) from which theJmsSpoutwill receive messages.
-
-
-
Constructor Detail
-
SpringJmsProvider
public SpringJmsProvider(String appContextClasspathResource, String connectionFactoryBean, String destinationBean)
Constructs aSpringJmsProviderobject given the name of a classpath resource (the spring application context file), and the bean names of a JMS connection factory and destination.- Parameters:
appContextClasspathResource- - the spring configuration file (classpath resource)connectionFactoryBean- - the JMS connection factory bean namedestinationBean- - the JMS destination bean name
-
-
Method Detail
-
connectionFactory
public javax.jms.ConnectionFactory connectionFactory() throws ExceptionDescription copied from interface:JmsProviderProvides the JMSConnectionFactory.- Specified by:
connectionFactoryin interfaceJmsProvider- Returns:
- the connection factory
- Throws:
Exception
-
destination
public javax.jms.Destination destination() throws ExceptionDescription copied from interface:JmsProviderProvides theDestination(topic or queue) from which theJmsSpoutwill receive messages.- Specified by:
destinationin interfaceJmsProvider- Throws:
Exception
-
-