Spring Integration

org.springframework.integration.channel
Class DirectChannel

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.channel.AbstractMessageChannel
          extended by org.springframework.integration.channel.AbstractSubscribableChannel
              extended by org.springframework.integration.channel.DirectChannel
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent, SubscribableChannel, TrackableComponent, MessageChannel

public class DirectChannel
extends AbstractSubscribableChannel

A channel that invokes a single subscriber for each sent Message. The invocation will occur in the sender's thread.

Author:
Dave Syer, Mark Fisher, Iwein Fuld, Oleg Zhurakousky, Gary Russell

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
DirectChannel()
          Create a channel with default RoundRobinLoadBalancingStrategy
DirectChannel(LoadBalancingStrategy loadBalancingStrategy)
          Create a DirectChannel with a LoadBalancingStrategy.
 
Method Summary
protected  UnicastingDispatcher getDispatcher()
           
 void setFailover(boolean failover)
          Specify whether the channel's dispatcher should have failover enabled.
 void setMaxSubscribers(int maxSubscribers)
          Specify the maximum number of subscribers supported by the channel's dispatcher.
 
Methods inherited from class org.springframework.integration.channel.AbstractSubscribableChannel
doSend, subscribe, unsubscribe
 
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, onInit, 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

DirectChannel

public DirectChannel()
Create a channel with default RoundRobinLoadBalancingStrategy


DirectChannel

public DirectChannel(LoadBalancingStrategy loadBalancingStrategy)
Create a DirectChannel with a LoadBalancingStrategy. The strategy must not be null.

Method Detail

setFailover

public void setFailover(boolean failover)
Specify whether the channel's dispatcher should have failover enabled. By default, it will. Set this value to 'false' to disable it.


setMaxSubscribers

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

Parameters:
maxSubscribers -

getDispatcher

protected UnicastingDispatcher getDispatcher()
Specified by:
getDispatcher in class AbstractSubscribableChannel

Spring Integration