|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.whirled.server.persist.SceneUpdateMarshaller
public class SceneUpdateMarshaller
A utility class to assist the management of scene updates by a SceneRepository.
| Constructor Summary | |
|---|---|
SceneUpdateMarshaller(Class<?>... typesClasses)
Create a SceneUpdateMarshaller that understands the update types specified. |
|
| Method Summary | |
|---|---|
SceneUpdate |
decodeUpdate(int sceneId,
int sceneVersion,
int updateType,
byte[] data)
Instantiates the appropriate update class and decodes the update from the data. |
Class<?> |
getUpdateClass(int type)
Returns the update class associated with the specified type code, or null. |
int |
getUpdateType(Class<?> typeClass)
Returns the type code that is assigned to the specified SceneUpdate class, or -1. |
int |
getUpdateType(SceneUpdate update)
Returns the type code that is assigned to the specified SceneUpdate instance, or -1. |
byte[] |
persistUpdate(SceneUpdate update)
Persists the specified update to a new ByteArrayOutInputStream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SceneUpdateMarshaller(Class<?>... typesClasses)
| Method Detail |
|---|
public int getUpdateType(SceneUpdate update)
public int getUpdateType(Class<?> typeClass)
public Class<?> getUpdateClass(int type)
public byte[] persistUpdate(SceneUpdate update)
throws PersistenceException
PersistenceException
public SceneUpdate decodeUpdate(int sceneId,
int sceneVersion,
int updateType,
byte[] data)
throws PersistenceException
PersistenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||