org.springframework.messaging.core

## Class BeanFactoryMessageChannelDestinationResolver

- java.lang.Object
- - org.springframework.messaging.core.BeanFactoryMessageChannelDestinationResolver

All Implemented Interfaces:
  org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, DestinationResolver<MessageChannel>

    public class BeanFactoryMessageChannelDestinationResolver
    extends Object
    implements DestinationResolver<MessageChannel>, org.springframework.beans.factory.BeanFactoryAware

An implementation of `DestinationResolver` that interprets a destination name as the bean name of a `MessageChannel` and looks up the bean in the configured `BeanFactory`.

Since:
  4.0
Author:
  Mark Fisher

### Constructor Summary

Constructors
Constructor and Description
`BeanFactoryMessageChannelDestinationResolver()` A default constructor that can be used when the resolver itself is configured as a Spring bean and will have the `BeanFactory` injected as a result of ing having implemented `BeanFactoryAware`.
`BeanFactoryMessageChannelDestinationResolver(org.springframework.beans.factory.BeanFactory beanFactory)` A constructor that accepts a `BeanFactory` useful if instantiating this resolver manually rather than having it defined as a Spring-managed bean.

### Method Summary

All Methods Instance Methods Concrete Methods
`MessageChannel` `resolveDestination(String name)` Resolve the given destination name.
`void` `setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)`

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

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

### Constructor Detail

#### BeanFactoryMessageChannelDestinationResolver

    public BeanFactoryMessageChannelDestinationResolver()

A default constructor that can be used when the resolver itself is configured as a Spring bean and will have the `BeanFactory` injected as a result of ing having implemented `BeanFactoryAware`.

#### BeanFactoryMessageChannelDestinationResolver

    public BeanFactoryMessageChannelDestinationResolver(org.springframework.beans.factory.BeanFactory beanFactory)

A constructor that accepts a `BeanFactory` useful if instantiating this resolver manually rather than having it defined as a Spring-managed bean.

Parameters:
  `beanFactory` - the bean factory to perform lookups against

### Method Detail

#### setBeanFactory

    public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)

Specified by:
  `setBeanFactory` in interface `org.springframework.beans.factory.BeanFactoryAware`

#### resolveDestination

    public MessageChannel resolveDestination(String name)

Description copied from interface: `DestinationResolver`
Resolve the given destination name.

Specified by:
  `resolveDestination` in interface `DestinationResolver<MessageChannel>`
Parameters:
  `name` - the destination name to resolve
Returns:
  the resolved destination (never `null`)