org.softamis.cluster4spring.support
Class AdvicesListProvidingUtils
java.lang.Object
org.softamis.cluster4spring.support.AdvicesListProvidingUtils
public class AdvicesListProvidingUtils
- extends java.lang.Object
Utility class used to collect advices with given names from bean factory.
*
- Author:
- Andrew Sazonov
Method Summary |
static java.util.List<org.aopalliance.aop.Advice> |
getAdvices(org.springframework.beans.factory.BeanFactory aBeanFactory,
java.lang.String[] aInterceptorNames)
Collects advices from given bean factory based on their name. |
protected static boolean |
isNamedBeanAnAdvisorOrAdvice(org.springframework.beans.factory.BeanFactory aBeanFactory,
java.lang.String aBeanName)
Determines whether bean with given name represents Advisor or Advice |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdvicesListProvidingUtils
public AdvicesListProvidingUtils()
getAdvices
public static java.util.List<org.aopalliance.aop.Advice> getAdvices(org.springframework.beans.factory.BeanFactory aBeanFactory,
java.lang.String[] aInterceptorNames)
throws org.springframework.beans.BeansException
- Collects advices from given bean factory based on their name. If bean denoted by name
is not advisor or advice, it silently ignored and is not added to resulting list.
- Parameters:
aBeanFactory
- factory where advice beans are collectedaInterceptorNames
- array of advices names
- Returns:
- list of advices that corresponds to given names
- Throws:
org.springframework.beans.BeansException
- thrown if obtaining Advice bean from
bean factory by one of given interceptor names was not successfull
isNamedBeanAnAdvisorOrAdvice
protected static boolean isNamedBeanAnAdvisorOrAdvice(org.springframework.beans.factory.BeanFactory aBeanFactory,
java.lang.String aBeanName)
- Determines whether bean with given name represents Advisor or Advice
- Parameters:
aBeanFactory
- factory used to check beanaBeanName
- bean name
- Returns:
- true if bean with given name is Advisor or Advice, false otherwise