Top Description Fields Constructors Methods
org.springframework.messaging.core

public Class BeanFactoryMessageChannelDestinationResolver

extends Object
implements DestinationResolver<MessageChannel>, BeanFactoryAware
Class Inheritance
All Implemented Interfaces
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.Aware, org.springframework.messaging.core.DestinationResolver
Imports
org.springframework.beans.BeansException, org.springframework.beans.factory.BeanFactory, .BeanFactoryAware, org.springframework.lang.Nullable, org.springframework.messaging.MessageChannel, org.springframework.util.Assert

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.
Author
Mark Fisher
Since
4.0

Field Summary

Modifier and TypeField and Description
private BeanFactory

Constructor Summary

AccessConstructor and Description
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.

public
BeanFactoryMessageChannelDestinationResolver(BeanFactory
the bean factory to perform lookups against
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

Modifier and TypeMethod and Description
public MessageChannel
resolveDestination(String
the destination name to resolve
name
)

Implements org.springframework.messaging.core.DestinationResolver.resolveDestination.

Resolve the given destination name.
public void
setBeanFactory(BeanFactory
owning BeanFactory (never null). The bean can immediately call methods on the factory.
beanFactory
)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanFactoryback to summary
private BeanFactory beanFactory
Annotations
@Nullable

Constructor Detail

BeanFactoryMessageChannelDestinationResolverback to summary
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.

BeanFactoryMessageChannelDestinationResolverback to summary
public BeanFactoryMessageChannelDestinationResolver(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:BeanFactory

the bean factory to perform lookups against

Method Detail

resolveDestinationback to summary
public MessageChannel resolveDestination(String name)

Implements org.springframework.messaging.core.DestinationResolver.resolveDestination.

Doc from org.springframework.messaging.core.DestinationResolver.resolveDestination.

Resolve the given destination name.

Parameters
name:String

the destination name to resolve

Returns:MessageChannel

the resolved destination (never null)

Annotations
@Override
setBeanFactoryback to summary
public void setBeanFactory(BeanFactory beanFactory)

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Doc from org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Callback that supplies the owning factory to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean#afterPropertiesSet() or a custom init-method.

Parameters
beanFactory:BeanFactory

owning BeanFactory (never null). The bean can immediately call methods on the factory.

Annotations
@Override