|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to be implemented by classes that hold the configuration of a factory of AOP proxies. This configuration includes the Interceptors and Advisors, and the proxied interfaces.
Any AOP proxy obtained from Spring can be cast to this interface to allow manipulation of its AOP advice.
AdvisedSupport
Method Summary | |
void |
addAdvisor(Advisor advisor)
Add an Advisor at the end of the advisor chain. |
void |
addAdvisor(int pos,
Advisor advisor)
Add an Advisor at the specified position in the chain |
void |
addAfterReturningAdvice(AfterReturningAdvice afterReturningAdvice)
Add an AfterReturningAdvice to the tail of the advice chain |
void |
addBeforeAdvice(MethodBeforeAdvice beforeAdvice)
Add a MethodBeforeAdvice to the tail of the advice chain |
void |
addInterceptor(org.aopalliance.intercept.Interceptor interceptor)
Add the given AOP Alliance interceptor to the tail of the advice (interceptor) chain. |
void |
addInterceptor(int pos,
org.aopalliance.intercept.Interceptor interceptor)
Add the given AOP Alliance interceptor at the specified position in the interceptor chain. |
void |
addThrowsAdvice(ThrowsAdvice throwsAdvice)
Add a ThrowsAdvice to the tail of the advice chain |
Advisor[] |
getAdvisors()
Return the Advisors applying to this proxy. |
boolean |
getExposeProxy()
Get whether the factory should expose the proxy as a ThreadLocal. |
java.lang.Class[] |
getProxiedInterfaces()
Return the interfaces proxied by the AOP proxy. |
boolean |
getProxyTargetClass()
Should we proxy the target class as well as any interfaces? |
TargetSource |
getTargetSource()
Return the TargetSource used by this Advised object |
int |
indexOf(Advisor advisor)
Return the index (from 0) of the given advisor, or -1 if no such advisor applies to this proxy. |
boolean |
isFrozen()
|
boolean |
isInterfaceProxied(java.lang.Class intf)
Return whether this interface is proxied |
boolean |
removeAdvisor(Advisor advisor)
Remove the given advisor |
void |
removeAdvisor(int index)
Remove the advisor at the given index |
boolean |
replaceAdvisor(Advisor a,
Advisor b)
Replace the given advisor. |
java.lang.String |
toProxyConfigString()
As toString() will normally pass to the target, this returns the equivalent for the AOP proxy |
Method Detail |
public TargetSource getTargetSource()
public boolean getExposeProxy()
this
no advice
will apply.) Getting the proxy is analogous to an EJB calling getEJBObject().
AopContext
public boolean getProxyTargetClass()
public Advisor[] getAdvisors()
public java.lang.Class[] getProxiedInterfaces()
public boolean isInterfaceProxied(java.lang.Class intf)
intf
- interface to test
public void addInterceptor(org.aopalliance.intercept.Interceptor interceptor) throws AopConfigException
interceptor
- to add to the tail of the chain
AopConfigException
addInterceptor(int, Interceptor)
,
DefaultPointcutAdvisor
public void addInterceptor(int pos, org.aopalliance.intercept.Interceptor interceptor) throws AopConfigException
pos
- index from 0 (head)interceptor
- interceptor to add at the specified position in the
interceptor chain
AopConfigException
public void addAfterReturningAdvice(AfterReturningAdvice afterReturningAdvice) throws AopConfigException
afterReturningAdvice
- AfterReturningAdvice to add
AopConfigException
- if the advice cannot be added--for example, because
the proxy configuration is frozenpublic void addBeforeAdvice(MethodBeforeAdvice beforeAdvice) throws AopConfigException
beforeAdvice
- MethodBeforeAdvice to add
AopConfigException
- if the advice cannot be added--for example, because
the proxy configuration is frozenpublic void addThrowsAdvice(ThrowsAdvice throwsAdvice) throws AopConfigException
throwsAdvice
- ThrowsAdvice to add
AopConfigException
- if the advice cannot be added--for example, because
the proxy configuration is frozenpublic void addAdvisor(Advisor advisor) throws AopConfigException
advisor
- Advisor to add to the end of the chain
AopConfigException
public void addAdvisor(int pos, Advisor advisor) throws AopConfigException
advisor
- advisor to add at the specified position in the chainpos
- position in chain (0 is head). Must be valid.
AopConfigException
public int indexOf(Advisor advisor)
advisor
- advisor to search for
public boolean removeAdvisor(Advisor advisor) throws AopConfigException
advisor
- advisor to remove
AopConfigException
public void removeAdvisor(int index) throws AopConfigException
index
- index of advisor to remove
AopConfigException
- if the index is invalidpublic boolean replaceAdvisor(Advisor a, Advisor b) throws AopConfigException
a
- advisor to replaceb
- advisor to replace it with
AopConfigException
public boolean isFrozen()
public java.lang.String toProxyConfigString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |