|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISharedObjectMessageSerializer
Serialize/deserialize shared object messages. Instances of this class can be provided to an ISharedObjectContainer (via ISOC.setSharedObjectMessageSerializer) to customize the shared object message serialization. Note that the serializer has to be symmetric, and able to deserialize objects of all relevant classes.
Method Summary | |
---|---|
java.lang.Object |
deserializeMessage(byte[] data)
Deserialize a byte array into an object message. |
byte[] |
serializeMessage(ID sharedObjectID,
java.lang.Object message)
Serialize an object to byte array. |
Method Detail |
---|
byte[] serializeMessage(ID sharedObjectID, java.lang.Object message) throws java.io.IOException
Serialize an object to byte array. This method will be called every time a shared object message is sent from one shared object instance to its replica.
Note that this method may be called many times, and should perform as rapidly as possible to support good marshalling performance.
sharedObjectID
- the ID for the sender shared object. Will not be null
.message
- the object to be serialized as the message.
deserializeMessage(byte[])
into
a corresponding object on a compatible container instance. Must not be null
.
java.io.IOException
- thrown if data cannot be serialized. Note that exceptions thrown will result in container-level disconnection.java.lang.Object deserializeMessage(byte[] data) throws java.io.IOException, java.lang.ClassNotFoundException
Deserialize a byte array into an object message. This method will be called every time a shared object message is received, but before the resulting Object is delivered to the shared object.
Note that this method may be called many times, and should perform as rapidly as possible to support good marshalling performance.
data
- the data to use to deserialize. Will not be null
.
java.io.IOException
- if some problem deserializing from given bytes.
java.lang.ClassNotFoundException
- thrown if class encoded in byte[] cannot be found in
local runtime. Note that exceptions thrown will result in container-level disconnection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |