|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.springframework.aop.target.HotSwappableTargetSource
Implementation of TargetSource interface that caches a local target object, but allows the target to be swapped while the application is running. If configuring an object of this class in a Spring IoC container, use Type 3 (constructor-style) IoC.
| Constructor Summary | |
HotSwappableTargetSource(java.lang.Object initialTarget)
Create a new HotSwappableTargetSource with the initial target |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
Two invoker interceptors are equal if they have the same target or if the targets are equal. |
java.lang.Object |
getTarget()
Synchronization around something that takes so little time is fine |
java.lang.Class |
getTargetClass()
|
boolean |
isStatic()
|
void |
releaseTarget(java.lang.Object o)
|
java.lang.Object |
swap(java.lang.Object newTarget)
Swap the target, returning the old target |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HotSwappableTargetSource(java.lang.Object initialTarget)
initialTarget - initial target| Method Detail |
public java.lang.Class getTargetClass()
getTargetClass in interface TargetSourcepublic final boolean isStatic()
isStatic in interface TargetSourceTargetSource.isStatic()public final java.lang.Object getTarget()
getTarget in interface TargetSourceTargetSource.getTarget()public void releaseTarget(java.lang.Object o)
releaseTarget in interface TargetSourceTargetSource.releaseTarget(java.lang.Object)
public java.lang.Object swap(java.lang.Object newTarget)
throws AopConfigException
newTarget - new target
AopConfigException - if the new target is invalidpublic boolean equals(java.lang.Object other)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||