org.springframework.messaging.support

## Class AbstractSubscribableChannel

- java.lang.Object
- - org.springframework.messaging.support.AbstractMessageChannel
  - - org.springframework.messaging.support.AbstractSubscribableChannel

All Implemented Interfaces:
  org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, MessageChannel, SubscribableChannel, InterceptableChannel

Direct Known Subclasses:
  ExecutorSubscribableChannel

    public abstract class AbstractSubscribableChannel
    extends AbstractMessageChannel
    implements SubscribableChannel

Abstract base class for `SubscribableChannel` implementations.

Since:
  4.0
Author:
  Rossen Stoyanchev

### Nested Class Summary

### Nested classes/interfaces inherited from class org.springframework.messaging.support.AbstractMessageChannel

`AbstractMessageChannel.ChannelInterceptorChain`

### Field Summary

### Fields inherited from class org.springframework.messaging.support.AbstractMessageChannel

`logger`

### Fields inherited from interface org.springframework.messaging.MessageChannel

`INDEFINITE_TIMEOUT`

### Constructor Summary

Constructors
Constructor and Description
`AbstractSubscribableChannel()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Set<MessageHandler>` `getSubscribers()`
`boolean` `hasSubscription(MessageHandler handler)`
`boolean` `subscribe(MessageHandler handler)` Register a message handler.
`boolean` `unsubscribe(MessageHandler handler)` Un-register a message handler.

### Methods inherited from class org.springframework.messaging.support.AbstractMessageChannel

`addInterceptor, addInterceptor, getBeanName, getInterceptors, getLogger, removeInterceptor, removeInterceptor, send, send, sendInternal, setBeanName, setInterceptors, setLogger, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.springframework.messaging.MessageChannel

`send, send`

### Constructor Detail

#### AbstractSubscribableChannel

    public AbstractSubscribableChannel()

### Method Detail

#### getSubscribers

    public Set<MessageHandler> getSubscribers()

#### hasSubscription

    public boolean hasSubscription(MessageHandler handler)

#### subscribe

    public boolean subscribe(MessageHandler handler)

Description copied from interface: `SubscribableChannel`
Register a message handler.

Specified by:
  `subscribe` in interface `SubscribableChannel`
Returns:
  `true` if the handler was subscribed or `false` if it was already subscribed.

#### unsubscribe

    public boolean unsubscribe(MessageHandler handler)

Description copied from interface: `SubscribableChannel`
Un-register a message handler.

Specified by:
  `unsubscribe` in interface `SubscribableChannel`
Returns:
  `true` if the handler was un-registered, or `false` if was not registered.