Class FixedSubscriberChannel

java.lang.Object
org.springframework.integration.channel.FixedSubscriberChannel
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, NamedComponent, org.springframework.messaging.MessageChannel, org.springframework.messaging.SubscribableChannel

public final class FixedSubscriberChannel extends Object implements org.springframework.messaging.SubscribableChannel, org.springframework.beans.factory.BeanNameAware, NamedComponent
Specialized SubscribableChannel for a single final subscriber set up during bean instantiation (unlike other SubscribableChannels where the MessageHandler is subscribed when the endpoint is started). This channel does not support interceptors or data types.

Note: Stopping (unsubscribe(MessageHandler)) the subscribed (MessageHandler) has no effect.

Since:
4.0
  • Constructor Details

    • FixedSubscriberChannel

      public FixedSubscriberChannel()
    • FixedSubscriberChannel

      public FixedSubscriberChannel(org.springframework.messaging.MessageHandler handler)
  • Method Details

    • setBeanName

      public void setBeanName(String name)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • getBeanName

      public String getBeanName()
      Specified by:
      getBeanName in interface NamedComponent
    • send

      public boolean send(org.springframework.messaging.Message<?> message)
      Specified by:
      send in interface org.springframework.messaging.MessageChannel
    • send

      public boolean send(org.springframework.messaging.Message<?> message, long timeout)
      Specified by:
      send in interface org.springframework.messaging.MessageChannel
    • subscribe

      public boolean subscribe(org.springframework.messaging.MessageHandler handler)
      Specified by:
      subscribe in interface org.springframework.messaging.SubscribableChannel
    • unsubscribe

      public boolean unsubscribe(org.springframework.messaging.MessageHandler handler)
      Specified by:
      unsubscribe in interface org.springframework.messaging.SubscribableChannel
    • getComponentType

      public String getComponentType()
      Specified by:
      getComponentType in interface NamedComponent
    • getComponentName

      public String getComponentName()
      Specified by:
      getComponentName in interface NamedComponent