org.logicblaze.lingo.jms.impl
Class DefaultJmsProducer
java.lang.Object
org.logicblaze.lingo.jms.impl.DefaultJmsProducer
- All Implemented Interfaces:
- JmsProducer, org.springframework.beans.factory.DisposableBean
public class DefaultJmsProducer
- extends Object
- implements JmsProducer, org.springframework.beans.factory.DisposableBean
An implementation of the JmsProducer
which
contains a reference to the connection, session and producer so that it can
easily close down all its resources properly. The connection may be owned by
another object and so it may not be automatically closed.
- Version:
- $Revision: 91 $
Constructor Summary |
DefaultJmsProducer(javax.jms.Connection connection,
javax.jms.Session session,
JmsProducerConfig config,
boolean ownsConnection)
|
DefaultJmsProducer(javax.jms.Connection connection,
javax.jms.Session session,
javax.jms.MessageProducer producer,
boolean ownsConnection)
|
Method Summary |
void |
close()
|
void |
destroy()
|
javax.jms.Connection |
getConnection()
|
javax.jms.MessageProducer |
getMessageProducer()
|
javax.jms.Session |
getSession()
|
static DefaultJmsProducer |
newInstance(javax.jms.ConnectionFactory factory,
JmsProducerConfig config)
|
static DefaultJmsProducer |
newInstance(javax.jms.Connection connection,
JmsProducerConfig config,
boolean ownsConnection)
|
void |
send(javax.jms.Destination destination,
javax.jms.Message message)
Sends a message to the given destination in a way that can be implemented
in JMS 1.0.2b as well as using the JMS 1.1 send() method on
MessageProducer |
void |
send(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to the given destination in a way that can be implemented
in JMS 1.0.2b as well as using the JMS 1.1 send() method on
MessageProducer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultJmsProducer
public DefaultJmsProducer(javax.jms.Connection connection,
javax.jms.Session session,
javax.jms.MessageProducer producer,
boolean ownsConnection)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
DefaultJmsProducer
public DefaultJmsProducer(javax.jms.Connection connection,
javax.jms.Session session,
JmsProducerConfig config,
boolean ownsConnection)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
newInstance
public static DefaultJmsProducer newInstance(javax.jms.ConnectionFactory factory,
JmsProducerConfig config)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
newInstance
public static DefaultJmsProducer newInstance(javax.jms.Connection connection,
JmsProducerConfig config,
boolean ownsConnection)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
getConnection
public javax.jms.Connection getConnection()
- Specified by:
getConnection
in interface JmsProducer
getSession
public javax.jms.Session getSession()
- Specified by:
getSession
in interface JmsProducer
getMessageProducer
public javax.jms.MessageProducer getMessageProducer()
- Specified by:
getMessageProducer
in interface JmsProducer
close
public void close()
throws javax.jms.JMSException
- Specified by:
close
in interface JmsProducer
- Throws:
javax.jms.JMSException
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface org.springframework.beans.factory.DisposableBean
- Throws:
Exception
send
public void send(javax.jms.Destination destination,
javax.jms.Message message)
throws javax.jms.JMSException
- Description copied from interface:
JmsProducer
- Sends a message to the given destination in a way that can be implemented
in JMS 1.0.2b as well as using the JMS 1.1 send() method on
MessageProducer
- Specified by:
send
in interface JmsProducer
- Throws:
javax.jms.JMSException
- if the message could not be sent
send
public void send(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws javax.jms.JMSException
- Description copied from interface:
JmsProducer
- Sends a message to the given destination in a way that can be implemented
in JMS 1.0.2b as well as using the JMS 1.1 send() method on
MessageProducer
- Specified by:
send
in interface JmsProducer
- Throws:
javax.jms.JMSException
- if the message could not be sent
Copyright © 2012 LogicBlaze, Inc.. All Rights Reserved.