Specifying the name of an advice bean instead of the advice object itself (if running within a BeanFactory) increases loose coupling at initialization time, in order to not initialize the advice object until the pointcut actually matches.
setAdviceBeanName, DefaultBeanFactoryPointcutAdvisor
| Modifier and Type | Field and Description |
|---|---|
| private transient volatile Advice | |
| private String | |
| private transient volatile Object | |
| private BeanFactory |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Advice | getAdvice()
Implements org. Return the advice part of this aspect. |
| public String | |
| private void | |
| private void | |
| public void | setAdvice(Advice advice)
Specify a particular instance of the target advice directly,
avoiding lazy resolution in |
| public void | setAdviceBeanName(String adviceBeanName)
Specify the name of the advice bean that this advisor should refer to. |
| public void | setBeanFactory(BeanFactory
owning BeanFactory (never beanFactory)null).
The bean can immediately call methods on the factory.Implements org. Callback that supplies the owning factory to a bean instance. |
| public String |
| advice | back to summary |
|---|---|
| private transient volatile Advice advice
| |
| adviceBeanName | back to summary |
|---|---|
| private String adviceBeanName
| |
| adviceMonitor | back to summary |
|---|---|
| private transient volatile Object adviceMonitor | |
| beanFactory | back to summary |
|---|---|
| private BeanFactory beanFactory
| |
| AbstractBeanFactoryPointcutAdvisor | back to summary |
|---|---|
| public AbstractBeanFactoryPointcutAdvisor() | |
| getAdvice | back to summary |
|---|---|
| public Advice getAdvice() Implements org. Doc from org. Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc. | |
| getAdviceBeanName | back to summary |
|---|---|
| public String getAdviceBeanName() Return the name of the advice bean that this advisor refers to, if any.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException | |
| resetAdviceMonitor | back to summary |
|---|---|
| private void resetAdviceMonitor() | |
| setAdvice | back to summary |
|---|---|
| public void setAdvice(Advice advice) Specify a particular instance of the target advice directly,
avoiding lazy resolution in
| |
| setAdviceBeanName | back to summary |
|---|---|
| public void setAdviceBeanName(String adviceBeanName) Specify the name of the advice bean that this advisor should refer to. An instance of the specified bean will be obtained on first access of this advisor's advice. This advisor will only ever obtain at most one single instance of the advice bean, caching the instance for the lifetime of the advisor.
| |
| setBeanFactory | back to summary |
|---|---|
| public void setBeanFactory(BeanFactory beanFactory) Implements org. Doc from org. Callback that supplies the owning factory to a bean instance. Invoked after the population of normal bean properties
but before an initialization callback such as
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |