|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.interceptor.ExposeBeanNameAdvisors
public abstract class ExposeBeanNameAdvisors
Convenient methods for creating advisors that may be used when autoproxying beans
created with the Spring IoC container, binding the bean name to the current
invocation. May support a bean()
pointcut designator with AspectJ.
Typically used in Spring auto-proxying, where the bean name is known at proxy creation time.
NamedBean
Constructor Summary | |
---|---|
ExposeBeanNameAdvisors()
|
Method Summary | |
---|---|
static Advisor |
createAdvisorIntroducingNamedBean(String beanName)
Create a new advisor that will expose the given bean name, introducing the NamedBean interface to make the bean name accessible without forcing the target object to be aware of this Spring IoC concept. |
static Advisor |
createAdvisorWithoutIntroduction(String beanName)
Create a new advisor that will expose the given bean name, with no introduction |
static String |
getBeanName()
Find the bean name for the current invocation. |
static String |
getBeanName(MethodInvocation mi)
Find the bean name for the given invocation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExposeBeanNameAdvisors()
Method Detail |
---|
public static String getBeanName() throws IllegalStateException
null
)
IllegalStateException
- if the bean name has not been exposedpublic static String getBeanName(MethodInvocation mi) throws IllegalStateException
mi
- MethodInvocation that should contain the bean name as an attribute
null
)
IllegalStateException
- if the bean name has not been exposedpublic static Advisor createAdvisorWithoutIntroduction(String beanName)
beanName
- bean name to exposepublic static Advisor createAdvisorIntroducingNamedBean(String beanName)
beanName
- bean name to expose
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |