diff options
Diffstat (limited to 'sources/events/internal')
| -rw-r--r-- | sources/events/internal/VSMessageReceiveEvent.java | 40 | ||||
| -rw-r--r-- | sources/events/internal/VSProtocolEvent.java | 16 | ||||
| -rw-r--r-- | sources/events/internal/VSProtocolScheduleEvent.java | 37 |
3 files changed, 92 insertions, 1 deletions
diff --git a/sources/events/internal/VSMessageReceiveEvent.java b/sources/events/internal/VSMessageReceiveEvent.java index 0cffa86..8972ce5 100644 --- a/sources/events/internal/VSMessageReceiveEvent.java +++ b/sources/events/internal/VSMessageReceiveEvent.java @@ -23,9 +23,12 @@ package events.internal; +import java.io.*; + import core.VSMessage; import events.VSAbstractEvent; import protocols.VSAbstractProtocol; +import serialize.VSSerialize; /** * The class VSMessageReceiveEvent. This event is used if a process receives @@ -106,4 +109,41 @@ public class VSMessageReceiveEvent extends VSAbstractEvent { return true; } + + /* (non-Javadoc) + * @see serialize.VSSerializable#serialize(serialize.VSSerialize, + * java.io.ObjectOutputStream) + */ + public synchronized void serialize(VSSerialize serialize, + ObjectOutputStream objectOutputStream) + throws IOException { + super.serialize(serialize, objectOutputStream); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + } + + /* (non-Javadoc) + * @see serialize.VSSerializable#deserialize(serialize.VSSerialize, + * java.io.ObjectInputStream) + */ + @SuppressWarnings("unchecked") + public synchronized void deserialize(VSSerialize serialize, + ObjectInputStream objectInputStream) + throws IOException, ClassNotFoundException { + super.deserialize(serialize, objectInputStream); + + if (VSSerialize.DEBUG) + System.out.println("Deserializing: VSProtocolEvent"); + + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + + } } diff --git a/sources/events/internal/VSProtocolEvent.java b/sources/events/internal/VSProtocolEvent.java index 5f5ceb4..8d6b2dd 100644 --- a/sources/events/internal/VSProtocolEvent.java +++ b/sources/events/internal/VSProtocolEvent.java @@ -27,7 +27,7 @@ import java.io.*; import events.*; import protocols.VSAbstractProtocol; -import serialize.*; +import serialize.VSSerialize; /** * The class VSProtocolEvent. This event is used if a protocol (server or @@ -144,9 +144,16 @@ public class VSProtocolEvent extends VSAbstractEvent { ObjectOutputStream objectOutputStream) throws IOException { super.serialize(serialize, objectOutputStream); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + objectOutputStream.writeObject(protocolClassname); objectOutputStream.writeObject(new Boolean(isClientProtocol)); objectOutputStream.writeObject(new Boolean(isProtocolActivation)); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); } /* (non-Javadoc) @@ -162,10 +169,17 @@ public class VSProtocolEvent extends VSAbstractEvent { if (VSSerialize.DEBUG) System.out.println("Deserializing: VSProtocolEvent"); + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + protocolClassname = (String) objectInputStream.readObject(); isClientProtocol = ((Boolean) objectInputStream.readObject()).booleanValue();; isProtocolActivation = ((Boolean) objectInputStream.readObject()).booleanValue();; + + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + } } diff --git a/sources/events/internal/VSProtocolScheduleEvent.java b/sources/events/internal/VSProtocolScheduleEvent.java index 912b552..99ae020 100644 --- a/sources/events/internal/VSProtocolScheduleEvent.java +++ b/sources/events/internal/VSProtocolScheduleEvent.java @@ -23,8 +23,11 @@ package events.internal; +import java.io.*; + import events.*; import protocols.VSAbstractProtocol; +import serialize.VSSerialize; /** * The class VSProtocolScheduleEvent. This event is used if a protocol (which @@ -110,4 +113,38 @@ public class VSProtocolScheduleEvent extends VSAbstractEvent { else protocol.onClientScheduleStart(); } + + /* (non-Javadoc) + * @see serialize.VSSerializable#serialize(serialize.VSSerialize, + * java.io.ObjectOutputStream) + */ + public synchronized void serialize(VSSerialize serialize, + ObjectOutputStream objectOutputStream) + throws IOException { + super.serialize(serialize, objectOutputStream); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + + /** For later backwards compatibility, to add more stuff */ + objectOutputStream.writeObject(new Boolean(false)); + } + + /* (non-Javadoc) + * @see serialize.VSSerializable#deserialize(serialize.VSSerialize, + * java.io.ObjectInputStream) + */ + @SuppressWarnings("unchecked") + public synchronized void deserialize(VSSerialize serialize, + ObjectInputStream objectInputStream) + throws IOException, ClassNotFoundException { + super.deserialize(serialize, objectInputStream); + + if (VSSerialize.DEBUG) + System.out.println("Deserializing: VSProtocolEvent"); + + /** For later backwards compatibility, to add more stuff */ + objectInputStream.readObject(); + + } } |
