|
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.framework.adapter.DefaultAdvisorAdapterRegistry
public class DefaultAdvisorAdapterRegistry
Default implementation of the AdvisorAdapterRegistry
interface.
Supports MethodInterceptor
,
MethodBeforeAdvice
,
AfterReturningAdvice
,
ThrowsAdvice
.
Constructor Summary | |
---|---|
DefaultAdvisorAdapterRegistry()
Create a new DefaultAdvisorAdapterRegistry, registering well-known adapters. |
Method Summary | |
---|---|
MethodInterceptor[] |
getInterceptors(Advisor advisor)
Return an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework. |
void |
registerAdvisorAdapter(AdvisorAdapter adapter)
Register the given AdvisorAdapter. |
Advisor |
wrap(Object adviceObject)
Return an Advisor wrapping the given advice. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAdvisorAdapterRegistry()
Method Detail |
---|
public Advisor wrap(Object adviceObject) throws UnknownAdviceTypeException
AdvisorAdapterRegistry
Should by default at least support
MethodInterceptor
,
MethodBeforeAdvice
,
AfterReturningAdvice
,
ThrowsAdvice
.
wrap
in interface AdvisorAdapterRegistry
adviceObject
- object that should be an advice
null
.
If the advice parameter is an Advisor, return it.
UnknownAdviceTypeException
- if no registered advisor adapter
can wrap the supposed advicepublic MethodInterceptor[] getInterceptors(Advisor advisor) throws UnknownAdviceTypeException
AdvisorAdapterRegistry
Don't worry about the pointcut associated with the Advisor, if it's a PointcutAdvisor: just return an interceptor.
getInterceptors
in interface AdvisorAdapterRegistry
advisor
- Advisor to find an interceptor for
UnknownAdviceTypeException
- if the Advisor type is
not understood by any registered AdvisorAdapter.public void registerAdvisorAdapter(AdvisorAdapter adapter)
AdvisorAdapterRegistry
registerAdvisorAdapter
in interface AdvisorAdapterRegistry
adapter
- AdvisorAdapter that understands a particular Advisor
or Advice types
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |