From 29a7fce34311293fa9e6b8709bfc4d50648ad0fd Mon Sep 17 00:00:00 2001 From: kske Date: Mon, 6 Jan 2020 18:13:00 +0100 Subject: [PATCH] Moved MessageEvent back from envoy-common. --- .../client/event/MessageCreationEvent.java | 1 - .../java/envoy/client/event/MessageEvent.java | 31 +++++++++++++++++++ .../event/MessageModificationEvent.java | 1 - 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/main/java/envoy/client/event/MessageEvent.java diff --git a/src/main/java/envoy/client/event/MessageCreationEvent.java b/src/main/java/envoy/client/event/MessageCreationEvent.java index d2e372d..36397d9 100644 --- a/src/main/java/envoy/client/event/MessageCreationEvent.java +++ b/src/main/java/envoy/client/event/MessageCreationEvent.java @@ -1,7 +1,6 @@ package envoy.client.event; import envoy.data.Message; -import envoy.event.MessageEvent; /** * Project: envoy-client
diff --git a/src/main/java/envoy/client/event/MessageEvent.java b/src/main/java/envoy/client/event/MessageEvent.java new file mode 100644 index 0000000..a1b5c68 --- /dev/null +++ b/src/main/java/envoy/client/event/MessageEvent.java @@ -0,0 +1,31 @@ +package envoy.client.event; + +import envoy.data.Message; +import envoy.event.Event; + +/** + * Project: envoy-client
+ * File: MessageCreationEvent.java
+ * Created: 4 Dec 2019
+ * + * @author Kai S. K. Engelbart + */ +public class MessageEvent implements Event { + + /** + * the {@link Message} attached to this {@link MessageEvent}. + */ + protected final Message message; + + /** + * Initializes a {@link MessageEvent} conveying information about a + * {@link Message} object. + * + * @param message the {@link Message} object to attach to this event + * @since Envoy v0.2-alpha + */ + public MessageEvent(Message message) { this.message = message; } + + @Override + public Message get() { return message; } +} diff --git a/src/main/java/envoy/client/event/MessageModificationEvent.java b/src/main/java/envoy/client/event/MessageModificationEvent.java index a5b7c41..248c6f1 100644 --- a/src/main/java/envoy/client/event/MessageModificationEvent.java +++ b/src/main/java/envoy/client/event/MessageModificationEvent.java @@ -1,7 +1,6 @@ package envoy.client.event; import envoy.data.Message; -import envoy.event.MessageEvent; /** * Project: envoy-client