| java.lang.Object org.springframework.ws.transport.support.DefaultStrategiesHelper
DefaultStrategiesHelper | public class DefaultStrategiesHelper (Code) | | Helper class for for loading default implementations of an interface. Encapsulates a properties object, which
contains strategy interface names as keys, and comma-separated class names as values.
Simulates the
BeanFactory normal lifecycle for beans, by calling
BeanFactoryAware.setBeanFactory(BeanFactory) ,
ApplicationContextAware.setApplicationContext(ApplicationContext) ,
etc.
author: Arjen Poutsma since: 1.0.0 |
Constructor Summary | |
public | DefaultStrategiesHelper(Properties defaultStrategies) Initializes a new instance of the DefaultStrategiesHelper based on the given set of properties. | public | DefaultStrategiesHelper(Resource resource) Initializes a new instance of the DefaultStrategiesHelper based on the given resource. |
Method Summary | |
public List | getDefaultStrategies(Class strategyInterface) Create a list of strategy objects for the given strategy interface. | public List | getDefaultStrategies(Class strategyInterface, ApplicationContext applicationContext) Create a list of strategy objects for the given strategy interface. | public Object | getDefaultStrategy(Class strategyInterface) Return the default strategy object for the given strategy interface. | public Object | getDefaultStrategy(Class strategyInterface, ApplicationContext applicationContext) Return the default strategy object for the given strategy interface. |
DefaultStrategiesHelper | public DefaultStrategiesHelper(Properties defaultStrategies)(Code) | | Initializes a new instance of the DefaultStrategiesHelper based on the given set of properties.
|
DefaultStrategiesHelper | public DefaultStrategiesHelper(Resource resource) throws IllegalStateException(Code) | | Initializes a new instance of the DefaultStrategiesHelper based on the given resource.
|
getDefaultStrategies | public List getDefaultStrategies(Class strategyInterface) throws BeanInitializationException(Code) | | Create a list of strategy objects for the given strategy interface. Strategies are retrieved from the
Properties object given at construction-time.
Parameters: strategyInterface - the strategy interface a list of corresponding strategy objects throws: BeansException - if initialization failed |
getDefaultStrategies | public List getDefaultStrategies(Class strategyInterface, ApplicationContext applicationContext) throws BeanInitializationException(Code) | | Create a list of strategy objects for the given strategy interface. Strategies are retrieved from the
Properties object given at construction-time. It instantiates the strategy objects and satisifies
ApplicationContextAware with the supplied context if necessary.
Parameters: strategyInterface - the strategy interface Parameters: applicationContext - used to satisfy strategies that are application context aware, may benull a list of corresponding strategy objects throws: BeansException - if initialization failed |
getDefaultStrategy | public Object getDefaultStrategy(Class strategyInterface) throws BeanInitializationException(Code) | | Return the default strategy object for the given strategy interface.
Parameters: strategyInterface - the strategy interface the corresponding strategy object throws: BeansException - if initialization failed See Also: DefaultStrategiesHelper.getDefaultStrategies |
getDefaultStrategy | public Object getDefaultStrategy(Class strategyInterface, ApplicationContext applicationContext) throws BeanInitializationException(Code) | | Return the default strategy object for the given strategy interface.
Delegates to
DefaultStrategiesHelper.getDefaultStrategies(Class,ApplicationContext) , expecting a single object in the list.
Parameters: strategyInterface - the strategy interface Parameters: applicationContext - used to satisfy strategies that are application context aware, may benull the corresponding strategy object throws: BeansException - if initialization failed |
|
|