|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A message that has a single object as raw data. More...

Public Member Functions | |
| MessageSerializedSimple () | |
| Empty constructor used for externalization. | |
| MessageSerializedSimple (MessageType type, T data) | |
| Constructor. | |
| synchronized void | serializeRawData (ObjectOutputStream output) |
| Writes this message's raw data to the provided output stream. | |
| synchronized void | deserializeRawData () |
| Reads an object of class T from the stream of raw data and stores it in data. | |
| T | getData () |
| Public Member Functions inherited from frodo2.communication.MessageWithRawData | |
| MessageWithRawData () | |
| Empty constructor used for externalization. | |
| void | writeExternal (ObjectOutput out) throws IOException |
| void | readExternal (ObjectInput in) throws IOException, ClassNotFoundException |
| MessageWithRawData (MessageType type) | |
| Constructor. | |
| RawDataHandler | getHandler () |
| void | setHandler (RawDataHandler handler) |
| Sets the raw data handler for this message. | |
| ObjectInputStream | getRawData () |
| Public Member Functions inherited from frodo2.communication.Message | |
| Message (MessageType type) | |
| Constructor. | |
| Message () | |
| Empty constructor. | |
| MessageType | getType () |
| String | toString () |
| void | fakeSerialize () |
| Pretends to serialize the message. | |
Private Member Functions | |
| void | setData (T data) |
Private Attributes | |
| transient T | data = null |
| The data that is going to be (de)serialized. | |
| transient Object | data_lock = new Object () |
| Object used to synchronize the access to data. | |
Additional Inherited Members | |
| Protected Member Functions inherited from frodo2.communication.MessageWithRawData | |
| void | finalize () throws Throwable |
| Discards the raw data. | |
| Protected Attributes inherited from frodo2.communication.MessageWithRawData | |
| RawDataHandler | handler |
| The object used to handle the raw data. | |
| Protected Attributes inherited from frodo2.communication.Message | |
| MessageType | type |
| The type of this message. | |
A message that has a single object as raw data.
This class is provided for convenience, and as an example of how to extend the Message class.
| <T> | the class of the object passed as raw data |
| frodo2.communication.MessageSerializedSimple< T extends Serializable >.MessageSerializedSimple | ( | ) |
Empty constructor used for externalization.
References data_lock.
| frodo2.communication.MessageSerializedSimple< T extends Serializable >.MessageSerializedSimple | ( | MessageType | type, |
| T | data ) |
Constructor.
| type | type of this message |
| data | the raw data |
References data, and frodo2.communication.Message.type.
| synchronized void frodo2.communication.MessageSerializedSimple< T extends Serializable >.deserializeRawData | ( | ) |
Reads an object of class T from the stream of raw data and stores it in data.
Reimplemented from frodo2.communication.MessageWithRawData.
References data, data_lock, deserializeRawData(), frodo2.communication.MessageWithRawData.getRawData(), and setData().
Referenced by deserializeRawData(), frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesSerialized(), and frodo2.communication.tcp.QueueOutputPipeTCPTest.testSerialized().

| T frodo2.communication.MessageSerializedSimple< T extends Serializable >.getData | ( | ) |
References data, and data_lock.
Referenced by frodo2.communication.sharedMemory.QueueIOPipeTest.test2QueuesInSeriesSerialized(), and frodo2.communication.tcp.QueueOutputPipeTCPTest.testSerialized().
| synchronized void frodo2.communication.MessageSerializedSimple< T extends Serializable >.serializeRawData | ( | ObjectOutputStream | output | ) |
Writes this message's raw data to the provided output stream.
Reimplemented from frodo2.communication.MessageWithRawData.
References data, data_lock, and frodo2.output.
|
private |
| data | the new value of the data |
References data, and data_lock.
Referenced by deserializeRawData().
|
private |
The data that is going to be (de)serialized.
Referenced by deserializeRawData(), getData(), MessageSerializedSimple(), serializeRawData(), and setData().
|
private |
Object used to synchronize the access to data.
We cannot synchronize directly over data because it can be null.
Referenced by deserializeRawData(), getData(), MessageSerializedSimple(), serializeRawData(), and setData().