Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2002-2013 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.messaging.core;
An implementation of DestinationResolver that interprets a destination name as the bean name of a org.springframework.messaging.MessageChannel and looks up the bean in the configured org.springframework.beans.factory.BeanFactory.

Author(s):
Mark Fisher
Since:
4.0
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 org.springframework.beans.factory.BeanFactoryAware.
	}

A constructor that accepts a org.springframework.beans.factory.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
		Assert.notNull(beanFactory"beanFactory must not be null");
		this. = beanFactory;
	}
	public void setBeanFactory(BeanFactory beanFactory) {
		this. = beanFactory;
	}
		Assert.state(this. != null"No BeanFactory configured");
		try {
			return this..getBean(nameMessageChannel.class);
		}
		catch (BeansException ex) {
					"Failed to find MessageChannel bean with name '" + name + "'"ex);
		}
	}
New to GrepCode? Check out our FAQ X