Package org.oddjob.arooa.life
Interface ComponentPersister
public interface ComponentPersister
Something capable of persisting a component. The Object passed is the
proxy not the underlying component.
- Author:
- rob
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear this persister of everything stored.voidclose()Free resources used by the implementation.String[]list()List the persisted components.voidpersist(String id, Object proxy, ArooaSession session) Persist the proxy Object.voidremove(String id, ArooaSession session) Remove an object from the store.restore(String id, ClassLoader classLoader, ArooaSession session) Restore the proxy Object.
-
Method Details
-
persist
Persist the proxy Object.The id is given although it could be discovered from the ComponentPool in the ArooaSession. This is for symmetry with the other methods of this interface.
- Parameters:
id- The id for proxy.proxy- The object to persist.session- The session.- Throws:
ComponentPersistException
-
restore
Object restore(String id, ClassLoader classLoader, ArooaSession session) throws ComponentPersistException Restore the proxy Object.- Parameters:
id- The id.session- The session.- Returns:
- The restored object.
- Throws:
ComponentPersistException
-
remove
Remove an object from the store.- Parameters:
id- The id of the component.session- The owning session.- Throws:
ComponentPersistException
-
list
List the persisted components.- Returns:
- The ids of the persisted components.
- Throws:
ComponentPersistException
-
clear
Clear this persister of everything stored.- Throws:
ComponentPersistException
-
close
void close()Free resources used by the implementation.
-