Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » aop » target » [javadoc | source]
org.springframework.aop.target
public class: HotSwappableTargetSource [javadoc | source]
java.lang.Object
   org.springframework.aop.target.HotSwappableTargetSource

All Implemented Interfaces:
    TargetSource, Serializable

org.springframework.aop.TargetSource implementation 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 constructor injection.

This TargetSource is serializable if the target is at the time of serialization.

Constructor:
 public HotSwappableTargetSource(Object initialTarget) 
    Create a new HotSwappableTargetSource with the given initial target object.
    Parameters:
    initialTarget - the initial target object
Method from org.springframework.aop.target.HotSwappableTargetSource Summary:
equals,   getTarget,   getTargetClass,   hashCode,   isStatic,   releaseTarget,   swap,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.target.HotSwappableTargetSource Detail:
 public boolean equals(Object other) 
    Two HotSwappableTargetSources are equal if the current target objects are equal.
 public synchronized Object getTarget() 
 public synchronized Class getTargetClass() 
    Return the type of the current target object.

    The returned type should usually be constant across all target objects.

 public int hashCode() 
 public final boolean isStatic() 
 public  void releaseTarget(Object target) 
 public synchronized Object swap(Object newTarget) throws IllegalArgumentException 
    Swap the target, returning the old target object.
 public String toString()