org.springframework.aop.target
Class PrototypeTargetSource

java.lang.Object
  extended byorg.springframework.aop.target.AbstractPrototypeBasedTargetSource
      extended byorg.springframework.aop.target.PrototypeTargetSource
All Implemented Interfaces:
BeanFactoryAware, InitializingBean, java.io.Serializable, TargetSource

public final class PrototypeTargetSource
extends AbstractPrototypeBasedTargetSource

TargetSource that creates a new instance of the target bean for each request. Can only be used in a bean factory.

Author:
Rod Johnson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.aop.target.AbstractPrototypeBasedTargetSource
logger
 
Constructor Summary
PrototypeTargetSource()
           
 
Method Summary
 java.lang.Object getTarget()
          Return a target instance.
 void releaseTarget(java.lang.Object target)
          Release the given target object obtained from the getTarget() method.
 
Methods inherited from class org.springframework.aop.target.AbstractPrototypeBasedTargetSource
afterPropertiesSet, getTargetBeanName, getTargetClass, isStatic, newPrototypeInstance, setBeanFactory, setTargetBeanName, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrototypeTargetSource

public PrototypeTargetSource()
Method Detail

getTarget

public java.lang.Object getTarget()
Description copied from interface: TargetSource
Return a target instance. Invoked immediately before the AOP framework calls the "target" of an AOP method invocation.

Returns:
the target object, whicch contains the joinpoint

releaseTarget

public void releaseTarget(java.lang.Object target)
Description copied from interface: TargetSource
Release the given target object obtained from the getTarget() method.

Parameters:
target - object obtained from a call to getTarget()
See Also:
TargetSource.getTarget()


Copyright (C) 2003-2004 The Spring Framework Project.