Example usage for org.springframework.data.gemfire.support GemfireBeanFactoryLocator GemfireBeanFactoryLocator

List of usage examples for org.springframework.data.gemfire.support GemfireBeanFactoryLocator GemfireBeanFactoryLocator

Introduction

In this page you can find the example usage for org.springframework.data.gemfire.support GemfireBeanFactoryLocator GemfireBeanFactoryLocator.

Prototype

GemfireBeanFactoryLocator

Source Link

Usage

From source file:org.springframework.data.gemfire.support.GemfireBeanFactoryLocator.java

/**
 * Factory method to construct a new, initialized instance of {@link GemfireBeanFactoryLocator}.
 *
 * @return a new, initialized instance of the {@link GemfireBeanFactoryLocator}.
 * @see GemfireBeanFactoryLocator/*w w  w  .  j  ava 2s. com*/
 * @see #GemfireBeanFactoryLocator()
 * @see #afterPropertiesSet()
 */
public static GemfireBeanFactoryLocator newBeanFactoryLocator() {

    GemfireBeanFactoryLocator beanFactoryLocator = new GemfireBeanFactoryLocator();

    beanFactoryLocator.afterPropertiesSet();

    return beanFactoryLocator;
}

From source file:org.springframework.data.gemfire.support.GemfireBeanFactoryLocator.java

/**
 * Factory method to construct a new, initialized instance of {@link GemfireBeanFactoryLocator} with the given
 * default Spring {@link BeanFactory} and associated Spring bean name.
 *
 * @param beanFactory reference to the {@link BeanFactory} used to resolve Spring bean references.
 * @param associatedBeanName {@link String} contain the name of the Spring bean associated with
 * the Spring {@link BeanFactory}.//from  www .  j  a  v a2s  .  c  o m
 * @return a new, initialized instance of {@link GemfireBeanFactoryLocator} with the given default
 * Spring {@link BeanFactory} and associated Spring bean name.
 * @see org.springframework.beans.factory.BeanFactory
 * @see GemfireBeanFactoryLocator
 * @see #GemfireBeanFactoryLocator()
 * @see #setBeanFactory(BeanFactory)
 * @see #setBeanName(String)
 * @see #afterPropertiesSet()
 */
public static GemfireBeanFactoryLocator newBeanFactoryLocator(BeanFactory beanFactory,
        String associatedBeanName) {

    Assert.isTrue(beanFactory == null || StringUtils.hasText(associatedBeanName),
            "associatedBeanName must be specified when BeanFactory is not null");

    GemfireBeanFactoryLocator beanFactoryLocator = new GemfireBeanFactoryLocator();

    beanFactoryLocator.setBeanFactory(beanFactory);
    beanFactoryLocator.setBeanName(associatedBeanName);
    beanFactoryLocator.afterPropertiesSet();

    return beanFactoryLocator;
}