I have changed the implementation to support saving/storing state.
The changes made:
state is now public State. This is because any implementation of the interface need to be able to access it to restore it.
New and NewWithRemote take now an id of the session and an implementation of SessionStorage, (or nil if in memory only). State will be saved after each successful step.
Added public method Load to session which loads a session from the session storage.
I have changed the implementation to support saving/storing state.
The changes made:
state
is now publicState
. This is because any implementation of the interface need to be able to access it to restore it.New
andNewWithRemote
take now anid
of the session and an implementation ofSessionStorage
, (ornil
if in memory only). State will be saved after each successful step.Load
tosession
which loads a session from the session storage.