|
spring-jms | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.jms.core.support.JmsGatewaySupport
public abstract class JmsGatewaySupport
Convenient super class for application classes that need JMS access.
Requires a ConnectionFactory or a JmsTemplate instance to be set.
It will create its own JmsTemplate if a ConnectionFactory is passed in.
A custom JmsTemplate instance can be created for a given ConnectionFactory
through overriding the createJmsTemplate(javax.jms.ConnectionFactory)
method.
setConnectionFactory(javax.jms.ConnectionFactory)
,
setJmsTemplate(org.springframework.jms.core.JmsTemplate)
,
createJmsTemplate(javax.jms.ConnectionFactory)
,
JmsTemplate
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
Constructor Summary | |
---|---|
JmsGatewaySupport()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected JmsTemplate |
createJmsTemplate(javax.jms.ConnectionFactory connectionFactory)
Create a JmsTemplate for the given ConnectionFactory. |
javax.jms.ConnectionFactory |
getConnectionFactory()
Return the JMS ConnectionFactory used by the gateway. |
JmsTemplate |
getJmsTemplate()
Return the JmsTemplate for the gateway. |
protected void |
initGateway()
Subclasses can override this for custom initialization behavior. |
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Set the JMS connection factory to be used by the gateway. |
void |
setJmsTemplate(JmsTemplate jmsTemplate)
Set the JmsTemplate for the gateway. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public JmsGatewaySupport()
Method Detail |
---|
public final void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
connectionFactory
- createJmsTemplate(javax.jms.ConnectionFactory)
,
setConnectionFactory(javax.jms.ConnectionFactory)
protected JmsTemplate createJmsTemplate(javax.jms.ConnectionFactory connectionFactory)
Can be overridden in subclasses to provide a JmsTemplate instance with a different configuration or the JMS 1.0.2 version, JmsTemplate102.
connectionFactory
- the JMS ConnectionFactory to create a JmsTemplate for
setConnectionFactory(javax.jms.ConnectionFactory)
,
JmsTemplate102
public final javax.jms.ConnectionFactory getConnectionFactory()
public final void setJmsTemplate(JmsTemplate jmsTemplate)
jmsTemplate
- setConnectionFactory(javax.jms.ConnectionFactory)
public final JmsTemplate getJmsTemplate()
public final void afterPropertiesSet() throws java.lang.IllegalArgumentException, org.springframework.beans.factory.BeanInitializationException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.IllegalArgumentException
org.springframework.beans.factory.BeanInitializationException
protected void initGateway() throws java.lang.Exception
java.lang.Exception
- if initialization fails
|
spring-jms | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |