summaryrefslogtreecommitdiff
path: root/sources/events/internal/VSProtocolScheduleEvent.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-06-03 16:41:37 +0000
committerPaul Buetow <paul@buetow.org>2008-06-03 16:41:37 +0000
commit11af1c9fa7fe66e10de0a92878311b4e22befb0f (patch)
tree8dfc7af2ec18eb5889327426bc6fdb7379a3feba /sources/events/internal/VSProtocolScheduleEvent.java
parentf7bdf8a7f6ebd43bfacc22eeeda3eb52bf50efd7 (diff)
made future serialized class versions backwards compatible.
Diffstat (limited to 'sources/events/internal/VSProtocolScheduleEvent.java')
-rw-r--r--sources/events/internal/VSProtocolScheduleEvent.java37
1 files changed, 37 insertions, 0 deletions
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();
+
+ }
}