|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.SRPersistentState
public class SRPersistentState
Manages saving & restoring state of an SRInstance. This is done between each HTTP request, since Java servlets are stateless. Uses java serialization.
| Field Summary | |
|---|---|
SRInstance |
m_run
The SRInstance that has been saved or restored. |
java.lang.String |
m_streamId
a unique key that can be used to find the right saved state. |
| Constructor Summary | |
|---|---|
SRPersistentState()
|
|
SRPersistentState(SRInstance run,
java.lang.String streamId)
Constructor used when saving state. |
|
| Method Summary | |
|---|---|
boolean |
activate(java.io.InputStream inStream)
Restore the saved state and recreate an SRInstance ready to resume execution. |
boolean |
passivate(java.io.OutputStream outStream,
java.lang.String streamId)
Saves the state to the given output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public SRInstance m_run
public java.lang.String m_streamId
| Constructor Detail |
|---|
public SRPersistentState()
public SRPersistentState(SRInstance run,
java.lang.String streamId)
run - The instance to be saved.streamId - The stream id that identifies the saved state.| Method Detail |
|---|
public boolean passivate(java.io.OutputStream outStream,
java.lang.String streamId)
outStream - output stream (can be a file, memory, etc)streamId - Stream id that uniquely identifies the saved state.
public boolean activate(java.io.InputStream inStream)
inStream - The input stream containing the saved state
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||