|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 targetMethod Detail |
public java.lang.Class getTargetClass()
getTargetClass
in interface TargetSource
public final boolean isStatic()
isStatic
in interface TargetSource
TargetSource.isStatic()
public final java.lang.Object getTarget()
getTarget
in interface TargetSource
TargetSource.getTarget()
public void releaseTarget(java.lang.Object o)
releaseTarget
in interface TargetSource
TargetSource.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 |