Interface ReloadAware

public interface ReloadAware

Optional interface that may be implemented by a service implementation (or even a proxy to give the service implementation more control over its lifecyle.


Method Summary
 boolean shutdownImplementationForReload()
          Invoked when Tapestry notices that the implementation class has changed.

Method Detail


boolean shutdownImplementationForReload()
Invoked when Tapestry notices that the implementation class has changed. The existing instance is notified, so that it can cleanly shutdown now, before being re-instantiated. This is necessary when the service implementation retains some form of external resources.

In addition, the implementation may request an immediate reload. Normally, reloading of the service is deferred until a method of the proxy object is invoked (this causes the normal just-in-time instantiation of the implementation). When this method returns true, the implementation is re-created immediately. This is most often the case for services that are eagerly loaded in the first place.

true if the service should be reloaded immediately, false if reload should be deferred

Copyright © 2003-2012 The Apache Software Foundation.