|
Spring AMQP | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.amqp.rabbit.core.support.RabbitGatewaySupport
public class RabbitGatewaySupport
Convenient super class for application classes that need JMS access.
Requires a ConnectionFactory or a RabbitTemplate instance to be set.
It will create its own RabbitTemplate if a ConnectionFactory is passed in.
A custom RabbitTemplate instance can be created for a given ConnectionFactory
through overriding the createRabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory) method.
setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory),
setRabbitTemplate(org.springframework.amqp.rabbit.core.RabbitTemplate),
createRabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory),
RabbitTemplate| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
| Constructor Summary | |
|---|---|
RabbitGatewaySupport()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected RabbitTemplate |
createRabbitTemplate(ConnectionFactory connectionFactory)
Create a RabbitTemplate for the given ConnectionFactory. |
ConnectionFactory |
getConnectionFactory()
Return the Rabbit ConnectionFactory used by the gateway. |
RabbitTemplate |
getRabbitTemplate()
Return the RabbitTemplate for the gateway. |
protected void |
initGateway()
Subclasses can override this for custom initialization behavior. |
void |
setConnectionFactory(ConnectionFactory connectionFactory)
Set the Rabbit connection factory to be used by the gateway. |
void |
setRabbitTemplate(RabbitTemplate rabbitTemplate)
Set the RabbitTemplate 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 RabbitGatewaySupport()
| Method Detail |
|---|
public final void setConnectionFactory(ConnectionFactory connectionFactory)
connectionFactory - createRabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory),
setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory)protected RabbitTemplate createRabbitTemplate(ConnectionFactory connectionFactory)
connectionFactory - the Rabbit ConnectionFactory to create a RabbitTemplate for
setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory)public final ConnectionFactory getConnectionFactory()
public final void setRabbitTemplate(RabbitTemplate rabbitTemplate)
rabbitTemplate - setConnectionFactory(org.springframework.amqp.rabbit.connection.ConnectionFactory)public final RabbitTemplate getRabbitTemplate()
public final void afterPropertiesSet()
throws IllegalArgumentException,
BeanInitializationException
afterPropertiesSet in interface InitializingBeanIllegalArgumentException
BeanInitializationException
protected void initGateway()
throws Exception
Exception - if initialization fails
|
Spring AMQP | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||