From 820d729e99011887ae1419c4eb4c5fe4ed0b5d6b Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Wed, 3 Feb 2021 16:20:34 +0100 Subject: [PATCH] recover of Message and MessageType class --- .../main/java/eu/dnetlib/message/Message.java | 58 +++++++++++++++++++ .../java/eu/dnetlib/message/MessageType.java | 6 ++ 2 files changed, 64 insertions(+) create mode 100644 dhp-common/src/main/java/eu/dnetlib/message/Message.java create mode 100644 dhp-common/src/main/java/eu/dnetlib/message/MessageType.java diff --git a/dhp-common/src/main/java/eu/dnetlib/message/Message.java b/dhp-common/src/main/java/eu/dnetlib/message/Message.java new file mode 100644 index 000000000..8932e02f3 --- /dev/null +++ b/dhp-common/src/main/java/eu/dnetlib/message/Message.java @@ -0,0 +1,58 @@ + +package eu.dnetlib.message; + +import java.util.Map; + +public class Message { + + private String workflowId; + + private String jobName; + + private MessageType type; + + private Map body; + + public Message() { + } + + public Message(final String workflowId, final String jobName, final MessageType type, + final Map body) { + this.workflowId = workflowId; + this.jobName = jobName; + this.type = type; + this.body = body; + } + + public String getWorkflowId() { + return workflowId; + } + + public void setWorkflowId(final String workflowId) { + this.workflowId = workflowId; + } + + public String getJobName() { + return jobName; + } + + public void setJobName(final String jobName) { + this.jobName = jobName; + } + + public MessageType getType() { + return type; + } + + public void setType(final MessageType type) { + this.type = type; + } + + public Map getBody() { + return body; + } + + public void setBody(final Map body) { + this.body = body; + } +} diff --git a/dhp-common/src/main/java/eu/dnetlib/message/MessageType.java b/dhp-common/src/main/java/eu/dnetlib/message/MessageType.java new file mode 100644 index 000000000..72cbda252 --- /dev/null +++ b/dhp-common/src/main/java/eu/dnetlib/message/MessageType.java @@ -0,0 +1,6 @@ + +package eu.dnetlib.message; + +public enum MessageType { + ONGOING, REPORT +}