From 1fba872558a0a2dc4e1da5f70ca1e57d1f8263b5 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Tue, 28 Jan 2020 17:50:09 +0100 Subject: [PATCH] Made Event and its implementations serializable --- src/main/java/envoy/event/Event.java | 4 +++- src/main/java/envoy/event/IdGeneratorRequest.java | 2 ++ src/main/java/envoy/event/MessageStatusChangeEvent.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/event/Event.java b/src/main/java/envoy/event/Event.java index 1aee5a4..3be9d9c 100644 --- a/src/main/java/envoy/event/Event.java +++ b/src/main/java/envoy/event/Event.java @@ -1,5 +1,7 @@ package envoy.event; +import java.io.Serializable; + /** * Project: envoy-common
* File: Event.java
@@ -9,7 +11,7 @@ package envoy.event; * @param the type of the Event * @since Envoy v0.2-alpha */ -public interface Event { +public interface Event extends Serializable { /** * @return the data associated with this event diff --git a/src/main/java/envoy/event/IdGeneratorRequest.java b/src/main/java/envoy/event/IdGeneratorRequest.java index ab80515..ec3ae34 100644 --- a/src/main/java/envoy/event/IdGeneratorRequest.java +++ b/src/main/java/envoy/event/IdGeneratorRequest.java @@ -11,4 +11,6 @@ package envoy.event; * @author Kai S. K. Engelbart */ public class IdGeneratorRequest implements Event { + + private static final long serialVersionUID = 1431107413883364583L; } diff --git a/src/main/java/envoy/event/MessageStatusChangeEvent.java b/src/main/java/envoy/event/MessageStatusChangeEvent.java index ebe818b..88b6cad 100644 --- a/src/main/java/envoy/event/MessageStatusChangeEvent.java +++ b/src/main/java/envoy/event/MessageStatusChangeEvent.java @@ -18,6 +18,8 @@ public class MessageStatusChangeEvent implements Event { private final Message.MessageStatus status; private final Date date; + private static final long serialVersionUID = 4566145392192761313L; + /** * Initializes a {@link MessageStatusChangeEvent}. *