|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.whirled.data.SceneUpdate
public class SceneUpdate
Used to encapsulate updates to scenes in such a manner that updates can be stored persistently and sent to clients to update their own local copies of scenes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Constructor Summary | |
|---|---|
SceneUpdate()
|
|
| Method Summary | |
|---|---|
void |
apply(SceneModel model)
Applies this update to the specified scene model. |
int |
getSceneId()
Returns the scene id for which this update is appropriate. |
int |
getSceneVersion()
Returns the scene version for which this update is appropriate. |
int |
getVersionIncrement()
Returns the amount by which this update increments the scene version. |
void |
init(int targetId,
int targetVersion)
Initializes this scene update such that it will operate on a scene with the specified target scene and version number. |
void |
persistTo(com.threerings.io.ObjectOutputStream out)
Serializes the bare representation of this instance without the scene id and version fields. |
void |
readObject(com.threerings.io.ObjectInputStream in)
Reads our custom streamable fields. |
String |
toString()
|
void |
unpersistFrom(com.threerings.io.ObjectInputStream in)
Unserializes this instance from the bare representation created by persistTo(com.threerings.io.ObjectOutputStream). |
void |
validate(SceneModel model)
Called to ensure that the scene is in the appropriate state prior to applying the update. |
void |
writeObject(com.threerings.io.ObjectOutputStream out)
Writes our custom streamable fields. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SceneUpdate()
| Method Detail |
|---|
public void init(int targetId,
int targetVersion)
targetId - the id of the scene on which we are to operate.targetVersion - the version of the scene on which we are to operate.public int getSceneId()
public int getSceneVersion()
public int getVersionIncrement()
public void validate(SceneModel model)
throws IllegalStateException
IllegalStateException - thrown if the update cannot be applied to the scene because
it is not in a valid state (appropriate previous updates were not applied, it's the wrong
kind of scene, etc.).public void apply(SceneModel model)
super.apply.
public void writeObject(com.threerings.io.ObjectOutputStream out)
throws IOException
IOException
public void readObject(com.threerings.io.ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public void persistTo(com.threerings.io.ObjectOutputStream out)
throws IOException
IOException
public void unpersistFrom(com.threerings.io.ObjectInputStream in)
throws IOException,
ClassNotFoundException
persistTo(com.threerings.io.ObjectOutputStream).
IOException
ClassNotFoundExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||