Class DirectChannel

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ComponentSourceAware, ExpressionCapable, IntegrationPattern, NamedComponent, IntegrationManagement, SubscribableChannelManagement, TrackableComponent, MessageChannel, SubscribableChannel, InterceptableChannel

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, Artem Bilan
  • Constructor Details

  • Method Details

    • 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. Overrides setFailoverStrategy(Predicate) option. In other words: or this, or that option has to be set.
      Parameters:
      failover - The failover boolean.
    • setFailoverStrategy

      public void setFailoverStrategy(Predicate<Exception> failoverStrategy)
      Configure a strategy whether the channel's dispatcher should have failover enabled for the exception thrown. Overrides setFailover(boolean) option. In other words: or this, or that option has to be set.
      Parameters:
      failoverStrategy - The failover boolean.
      Since:
      6.3
    • setMaxSubscribers

      public void setMaxSubscribers(int maxSubscribers)
      Specify the maximum number of subscribers supported by the channel's dispatcher.
      Parameters:
      maxSubscribers - The maximum number of subscribers allowed.
    • getDispatcher

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

      protected void onInit()
      Description copied from class: IntegrationObjectSupport
      Subclasses may implement this for initialization logic.
      Overrides:
      onInit in class AbstractMessageChannel