org.apache.tapestry5.ioc.internal
Class AbstractReloadableObjectCreator

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator
All Implemented Interfaces:
javassist.Translator, ObjectCreator, UpdateListener
Direct Known Subclasses:
ReloadableObjectCreator, ReloadableServiceImplementationObjectCreator

public abstract class AbstractReloadableObjectCreator
extends java.lang.Object
implements ObjectCreator, UpdateListener, javassist.Translator


Constructor Summary
protected AbstractReloadableObjectCreator(java.lang.ClassLoader baseClassLoader, java.lang.String implementationClassName, org.slf4j.Logger logger, OperationTracker tracker)
           
 
Method Summary
 void checkForUpdates()
          Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.
protected abstract  java.lang.Object createInstance(java.lang.Class clazz)
          Invoked when an instance of the class is needed.
 java.lang.Object createObject()
          Create and return the object.
 void onLoad(javassist.ClassPool pool, java.lang.String className)
           
 void start(javassist.ClassPool pool)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractReloadableObjectCreator

protected AbstractReloadableObjectCreator(java.lang.ClassLoader baseClassLoader,
                                          java.lang.String implementationClassName,
                                          org.slf4j.Logger logger,
                                          OperationTracker tracker)
Method Detail

checkForUpdates

public void checkForUpdates()
Description copied from interface: UpdateListener
Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.

Specified by:
checkForUpdates in interface UpdateListener

createObject

public java.lang.Object createObject()
Description copied from interface: ObjectCreator
Create and return the object. In some limited circumstances, the implementation may cache the result, returning the same object for repeated calls.

Specified by:
createObject in interface ObjectCreator

createInstance

protected abstract java.lang.Object createInstance(java.lang.Class clazz)
Invoked when an instance of the class is needed. It is the responsibility of this method (as implemented in a subclass) to instantiate the class and inject dependencies into the class.

See Also:
InternalUtils.findAutobuildConstructor(Class)

onLoad

public void onLoad(javassist.ClassPool pool,
                   java.lang.String className)
            throws javassist.NotFoundException,
                   javassist.CannotCompileException
Specified by:
onLoad in interface javassist.Translator
Throws:
javassist.NotFoundException
javassist.CannotCompileException

start

public void start(javassist.ClassPool pool)
           throws javassist.NotFoundException,
                  javassist.CannotCompileException
Does nothing.

Specified by:
start in interface javassist.Translator
Throws:
javassist.NotFoundException
javassist.CannotCompileException


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.