01: /*
02: * Created on 22 Jul 2006
03: */
04: package uk.org.ponder.rsf.preservation;
05:
06: import uk.org.ponder.beanutil.BeanLocator;
07: import uk.org.ponder.beanutil.WriteableBeanLocator;
08: import uk.org.ponder.stringutil.StringList;
09:
10: /** A state preservation strategy that requires no token to be specified.
11: * It automatically locates its own storage, for example either because it is
12: * specified through an external dependency (e.g. bean scope) or because it
13: * is stored in the client.
14: * @author Antranig Basman (antranig@caret.cam.ac.uk)
15: *
16: */
17:
18: public interface AutonomousStatePreservationStrategy {
19: /** Restores any beans preserved by this strategy into the target
20: * container.
21: * @return A list of lock names that will need to be acquired by any
22: * request proceeding to access the model, resulting from possible sharing
23: * of the target of the storage. <code>null</code> where no locks are required.
24: */
25: public StringList restore(WriteableBeanLocator target);
26:
27: public void preserve(BeanLocator source);
28: }
|