org.opennms.netmgt.dao.castor
Class AbstractCastorConfigDao.CastorReloadCallback

java.lang.Object
  extended by org.opennms.netmgt.dao.castor.AbstractCastorConfigDao.CastorReloadCallback
All Implemented Interfaces:
FileReloadCallback<V>
Enclosing class:
AbstractCastorConfigDao<K,V>

public class AbstractCastorConfigDao.CastorReloadCallback
extends Object
implements FileReloadCallback<V>


Constructor Summary
AbstractCastorConfigDao.CastorReloadCallback()
           
 
Method Summary
 V reload(V object, org.springframework.core.io.Resource resource)
           Reload the specified object from the underlying file and return the new object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCastorConfigDao.CastorReloadCallback

public AbstractCastorConfigDao.CastorReloadCallback()
Method Detail

reload

public V reload(V object,
                org.springframework.core.io.Resource resource)
Description copied from interface: FileReloadCallback

Reload the specified object from the underlying file and return the new object. This is called when FileReloadContainer.getObject() determines that the underlying file object has changed.

Any unchecked exceptions that are thrown will be caught by the container, logged, and rethrown with additional details including the object and the file underlying the object. Note that such unchecked exceptions will propogate back up to the caller of getObject(). Unchecked exceptions should be caught if this is not desired. Null can be returned to indicated to the caller that the old object should continue to be used.

Specified by:
reload in interface FileReloadCallback<V>
Parameters:
object - object to be reloaded. This is useful if the class receiving the callback handles many objects of the same type and needs to know any details about the object being reloaded.
resource - resource for the underlying object that should be used for reloading
Returns:
the new object, or null if the old object should continue being used


Copyright © 2009. All Rights Reserved.