Spring Integration

org.springframework.integration.amqp.channel
Class PointToPointSubscribableAmqpChannel

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.channel.AbstractMessageChannel
          extended by org.springframework.integration.amqp.channel.AbstractAmqpChannel
              extended by org.springframework.integration.amqp.channel.PointToPointSubscribableAmqpChannel
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, NamedComponent, SubscribableChannel, TrackableComponent, MessageChannel

public class PointToPointSubscribableAmqpChannel
extends AbstractAmqpChannel

Since:
2.1
Author:
Mark Fisher

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel
AbstractMessageChannel.ChannelInterceptorList
 
Field Summary
 
Fields inherited from class org.springframework.integration.channel.AbstractMessageChannel
logger
 
Constructor Summary
PointToPointSubscribableAmqpChannel(java.lang.String channelName, org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer container, org.springframework.amqp.core.AmqpTemplate amqpTemplate)
           
 
Method Summary
protected  MessageDispatcher createDispatcher()
           
 void destroy()
           
 int getPhase()
           
protected  java.lang.String getRoutingKey()
          Subclasses may override this method to return a routing key.
protected  org.springframework.amqp.core.Queue initializeQueue(org.springframework.amqp.core.AmqpAdmin admin, java.lang.String channelName)
           
 boolean isAutoStartup()
           
 boolean isRunning()
           
 void onInit()
          Subclasses may implement this for initialization logic.
 void setMaxSubscribers(int maxSubscribers)
          Specify the maximum number of subscribers supported by the channel's dispatcher (if it is an AbstractDispatcher).
 void setQueueName(java.lang.String queueName)
          Provide a Queue name to be used.
 void start()
           
 void stop()
           
 void stop(java.lang.Runnable callback)
           
 boolean subscribe(MessageHandler handler)
          Register a MessageHandler as a subscriber to this channel.
 boolean unsubscribe(MessageHandler handler)
          Remove a MessageHandler from the subscribers of this channel.
 
Methods inherited from class org.springframework.integration.amqp.channel.AbstractAmqpChannel
doSend, getExchangeName
 
Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel
addInterceptor, getComponentType, getInterceptors, send, send, setConversionService, setDatatypes, setInterceptors, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.MessageChannel
send, send
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

PointToPointSubscribableAmqpChannel

public PointToPointSubscribableAmqpChannel(java.lang.String channelName,
                                           org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer container,
                                           org.springframework.amqp.core.AmqpTemplate amqpTemplate)
Method Detail

setQueueName

public void setQueueName(java.lang.String queueName)
Provide a Queue name to be used. If this is not provided, the Queue's name will be the same as the channel name.


initializeQueue

protected org.springframework.amqp.core.Queue initializeQueue(org.springframework.amqp.core.AmqpAdmin admin,
                                                              java.lang.String channelName)

createDispatcher

protected MessageDispatcher createDispatcher()

getRoutingKey

protected java.lang.String getRoutingKey()
Description copied from class: AbstractAmqpChannel
Subclasses may override this method to return a routing key. By default, there will be no routing key (empty string).

Overrides:
getRoutingKey in class AbstractAmqpChannel

setMaxSubscribers

public void setMaxSubscribers(int maxSubscribers)
Specify the maximum number of subscribers supported by the channel's dispatcher (if it is an AbstractDispatcher).

Parameters:
maxSubscribers -

subscribe

public boolean subscribe(MessageHandler handler)
Description copied from interface: SubscribableChannel
Register a MessageHandler as a subscriber to this channel.

Specified by:
subscribe in interface SubscribableChannel

unsubscribe

public boolean unsubscribe(MessageHandler handler)
Description copied from interface: SubscribableChannel
Remove a MessageHandler from the subscribers of this channel.

Specified by:
unsubscribe in interface SubscribableChannel

onInit

public void onInit()
            throws java.lang.Exception
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport
Throws:
java.lang.Exception

isAutoStartup

public boolean isAutoStartup()
Specified by:
isAutoStartup in interface org.springframework.context.SmartLifecycle

getPhase

public int getPhase()
Specified by:
getPhase in interface org.springframework.context.Phased

isRunning

public boolean isRunning()
Specified by:
isRunning in interface org.springframework.context.Lifecycle

start

public void start()
Specified by:
start in interface org.springframework.context.Lifecycle

stop

public void stop()
Specified by:
stop in interface org.springframework.context.Lifecycle

stop

public void stop(java.lang.Runnable callback)
Specified by:
stop in interface org.springframework.context.SmartLifecycle

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception

Spring Integration