summaryrefslogtreecommitdiff
path: root/sources/events/internal/VSProtocolEvent.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-06-02 00:21:43 +0000
committerPaul Buetow <paul@buetow.org>2008-06-02 00:21:43 +0000
commit378c2674fc704b2a6bbf0e6a01b721a7aea7c2e2 (patch)
treeae228c2fb8c1387d2667322f60a649032c52c152 /sources/events/internal/VSProtocolEvent.java
parenta24f52761a623afa3c041b7823004952d8c5286e (diff)
saveing seems work, but may have bugs
Diffstat (limited to 'sources/events/internal/VSProtocolEvent.java')
-rw-r--r--sources/events/internal/VSProtocolEvent.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/sources/events/internal/VSProtocolEvent.java b/sources/events/internal/VSProtocolEvent.java
index cfb1e35..5f5ceb4 100644
--- a/sources/events/internal/VSProtocolEvent.java
+++ b/sources/events/internal/VSProtocolEvent.java
@@ -23,8 +23,11 @@
package events.internal;
+import java.io.*;
+
import events.*;
import protocols.VSAbstractProtocol;
+import serialize.*;
/**
* The class VSProtocolEvent. This event is used if a protocol (server or
@@ -132,4 +135,37 @@ public class VSProtocolEvent extends VSAbstractEvent {
logg(buffer.toString());
}
+
+ /* (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);
+ objectOutputStream.writeObject(protocolClassname);
+ objectOutputStream.writeObject(new Boolean(isClientProtocol));
+ objectOutputStream.writeObject(new Boolean(isProtocolActivation));
+ }
+
+ /* (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");
+
+ protocolClassname = (String) objectInputStream.readObject();
+ isClientProtocol = ((Boolean)
+ objectInputStream.readObject()).booleanValue();;
+ isProtocolActivation = ((Boolean)
+ objectInputStream.readObject()).booleanValue();;
+ }
}