Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B59D17EBF for ; Mon, 6 Oct 2014 19:54:50 +0000 (UTC) Received: (qmail 15754 invoked by uid 500); 6 Oct 2014 19:54:50 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 15683 invoked by uid 500); 6 Oct 2014 19:54:50 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 15671 invoked by uid 99); 6 Oct 2014 19:54:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Oct 2014 19:54:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E91E48B3326; Mon, 6 Oct 2014 19:54:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: chathuri@apache.org To: commits@airavata.apache.org Date: Mon, 06 Oct 2014 19:54:49 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/23] adding initial messaging framework changes Repository: airavata Updated Branches: refs/heads/master dbb1c97a1 -> 282362f10 http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/WorkflowNodeStatusChangeEvent.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/WorkflowNodeStatusChangeEvent.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/WorkflowNodeStatusChangeEvent.java new file mode 100644 index 0000000..305ff19 --- /dev/null +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/WorkflowNodeStatusChangeEvent.java @@ -0,0 +1,509 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.airavata.model.messaging.event; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@SuppressWarnings("all") public class WorkflowNodeStatusChangeEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WorkflowNodeStatusChangeEvent"); + + private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField WORKFLOW_NODE_IDENTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowNodeIdentity", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new WorkflowNodeStatusChangeEventStandardSchemeFactory()); + schemes.put(TupleScheme.class, new WorkflowNodeStatusChangeEventTupleSchemeFactory()); + } + + private org.apache.airavata.model.workspace.experiment.WorkflowNodeState state; // required + private WorkflowIdentity workflowNodeIdentity; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see org.apache.airavata.model.workspace.experiment.WorkflowNodeState + */ + STATE((short)1, "state"), + WORKFLOW_NODE_IDENTITY((short)2, "workflowNodeIdentity"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATE + return STATE; + case 2: // WORKFLOW_NODE_IDENTITY + return WORKFLOW_NODE_IDENTITY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.workspace.experiment.WorkflowNodeState.class))); + tmpMap.put(_Fields.WORKFLOW_NODE_IDENTITY, new org.apache.thrift.meta_data.FieldMetaData("workflowNodeIdentity", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WorkflowIdentity.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WorkflowNodeStatusChangeEvent.class, metaDataMap); + } + + public WorkflowNodeStatusChangeEvent() { + } + + public WorkflowNodeStatusChangeEvent( + org.apache.airavata.model.workspace.experiment.WorkflowNodeState state, + WorkflowIdentity workflowNodeIdentity) + { + this(); + this.state = state; + this.workflowNodeIdentity = workflowNodeIdentity; + } + + /** + * Performs a deep copy on other. + */ + public WorkflowNodeStatusChangeEvent(WorkflowNodeStatusChangeEvent other) { + if (other.isSetState()) { + this.state = other.state; + } + if (other.isSetWorkflowNodeIdentity()) { + this.workflowNodeIdentity = new WorkflowIdentity(other.workflowNodeIdentity); + } + } + + public WorkflowNodeStatusChangeEvent deepCopy() { + return new WorkflowNodeStatusChangeEvent(this); + } + + @Override + public void clear() { + this.state = null; + this.workflowNodeIdentity = null; + } + + /** + * + * @see org.apache.airavata.model.workspace.experiment.WorkflowNodeState + */ + public org.apache.airavata.model.workspace.experiment.WorkflowNodeState getState() { + return this.state; + } + + /** + * + * @see org.apache.airavata.model.workspace.experiment.WorkflowNodeState + */ + public void setState(org.apache.airavata.model.workspace.experiment.WorkflowNodeState state) { + this.state = state; + } + + public void unsetState() { + this.state = null; + } + + /** Returns true if field state is set (has been assigned a value) and false otherwise */ + public boolean isSetState() { + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public WorkflowIdentity getWorkflowNodeIdentity() { + return this.workflowNodeIdentity; + } + + public void setWorkflowNodeIdentity(WorkflowIdentity workflowNodeIdentity) { + this.workflowNodeIdentity = workflowNodeIdentity; + } + + public void unsetWorkflowNodeIdentity() { + this.workflowNodeIdentity = null; + } + + /** Returns true if field workflowNodeIdentity is set (has been assigned a value) and false otherwise */ + public boolean isSetWorkflowNodeIdentity() { + return this.workflowNodeIdentity != null; + } + + public void setWorkflowNodeIdentityIsSet(boolean value) { + if (!value) { + this.workflowNodeIdentity = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATE: + if (value == null) { + unsetState(); + } else { + setState((org.apache.airavata.model.workspace.experiment.WorkflowNodeState)value); + } + break; + + case WORKFLOW_NODE_IDENTITY: + if (value == null) { + unsetWorkflowNodeIdentity(); + } else { + setWorkflowNodeIdentity((WorkflowIdentity)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATE: + return getState(); + + case WORKFLOW_NODE_IDENTITY: + return getWorkflowNodeIdentity(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATE: + return isSetState(); + case WORKFLOW_NODE_IDENTITY: + return isSetWorkflowNodeIdentity(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof WorkflowNodeStatusChangeEvent) + return this.equals((WorkflowNodeStatusChangeEvent)that); + return false; + } + + public boolean equals(WorkflowNodeStatusChangeEvent that) { + if (that == null) + return false; + + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); + if (this_present_state || that_present_state) { + if (!(this_present_state && that_present_state)) + return false; + if (!this.state.equals(that.state)) + return false; + } + + boolean this_present_workflowNodeIdentity = true && this.isSetWorkflowNodeIdentity(); + boolean that_present_workflowNodeIdentity = true && that.isSetWorkflowNodeIdentity(); + if (this_present_workflowNodeIdentity || that_present_workflowNodeIdentity) { + if (!(this_present_workflowNodeIdentity && that_present_workflowNodeIdentity)) + return false; + if (!this.workflowNodeIdentity.equals(that.workflowNodeIdentity)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(WorkflowNodeStatusChangeEvent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetWorkflowNodeIdentity()).compareTo(other.isSetWorkflowNodeIdentity()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWorkflowNodeIdentity()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowNodeIdentity, other.workflowNodeIdentity); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("WorkflowNodeStatusChangeEvent("); + boolean first = true; + + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + if (!first) sb.append(", "); + sb.append("workflowNodeIdentity:"); + if (this.workflowNodeIdentity == null) { + sb.append("null"); + } else { + sb.append(this.workflowNodeIdentity); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetState()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); + } + + if (!isSetWorkflowNodeIdentity()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'workflowNodeIdentity' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (workflowNodeIdentity != null) { + workflowNodeIdentity.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class WorkflowNodeStatusChangeEventStandardSchemeFactory implements SchemeFactory { + public WorkflowNodeStatusChangeEventStandardScheme getScheme() { + return new WorkflowNodeStatusChangeEventStandardScheme(); + } + } + + private static class WorkflowNodeStatusChangeEventStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, WorkflowNodeStatusChangeEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // STATE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.state = org.apache.airavata.model.workspace.experiment.WorkflowNodeState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // WORKFLOW_NODE_IDENTITY + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.workflowNodeIdentity = new WorkflowIdentity(); + struct.workflowNodeIdentity.read(iprot); + struct.setWorkflowNodeIdentityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, WorkflowNodeStatusChangeEvent struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(struct.state.getValue()); + oprot.writeFieldEnd(); + } + if (struct.workflowNodeIdentity != null) { + oprot.writeFieldBegin(WORKFLOW_NODE_IDENTITY_FIELD_DESC); + struct.workflowNodeIdentity.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class WorkflowNodeStatusChangeEventTupleSchemeFactory implements SchemeFactory { + public WorkflowNodeStatusChangeEventTupleScheme getScheme() { + return new WorkflowNodeStatusChangeEventTupleScheme(); + } + } + + private static class WorkflowNodeStatusChangeEventTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeStatusChangeEvent struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.state.getValue()); + struct.workflowNodeIdentity.write(oprot); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, WorkflowNodeStatusChangeEvent struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.state = org.apache.airavata.model.workspace.experiment.WorkflowNodeState.findByValue(iprot.readI32()); + struct.setStateIsSet(true); + struct.workflowNodeIdentity = new WorkflowIdentity(); + struct.workflowNodeIdentity.read(iprot); + struct.setWorkflowNodeIdentityIsSet(true); + } + } + +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/airavata-api/thrift-interface-descriptions/airavataDataModel.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/airavataDataModel.thrift b/airavata-api/thrift-interface-descriptions/airavataDataModel.thrift index 8c772e4..dd5ed51 100644 --- a/airavata-api/thrift-interface-descriptions/airavataDataModel.thrift +++ b/airavata-api/thrift-interface-descriptions/airavataDataModel.thrift @@ -20,6 +20,7 @@ include "workspaceModel.thrift" include "airavataErrors.thrift" +include "messagingEvents.thrift" namespace java org.apache.airavata.model namespace php Airavata.Model http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/airavata-api/thrift-interface-descriptions/messagingEvents.thrift ---------------------------------------------------------------------- diff --git a/airavata-api/thrift-interface-descriptions/messagingEvents.thrift b/airavata-api/thrift-interface-descriptions/messagingEvents.thrift new file mode 100644 index 0000000..a9be5bd --- /dev/null +++ b/airavata-api/thrift-interface-descriptions/messagingEvents.thrift @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +include "experimentModel.thrift" + +namespace java org.apache.airavata.model.messaging.event +namespace php Airavata.Model.Messaging.Event +namespace cpp apache.airavata.model.messaging.event + +struct ExperimentStatusChangeEvent { + 1: required experimentModel.ExperimentState state; + 2: required string experimentId; +} + +struct WorkflowIdentity { + 1: required string workflowNodeId; + 2: required string experimentId; +} + +struct WorkflowNodeStatusChangeEvent { + 1: required experimentModel.WorkflowNodeState state; + 2: required WorkflowIdentity workflowNodeIdentity; +} + +struct TaskIdentity { + 1: required string taskId; + 2: required string workflowNodeId; + 3: required string experimentId; +} + +struct TaskStatusChangeEvent { + 1: required experimentModel.TaskState state; + 2: required TaskIdentity taskIdentity; +} + +struct JobIdentity { + 1: required string jobId; + 2: required string taskId; + 3: required string workflowNodeId; + 4: required string experimentId; +} + +struct JobMonitor { + 1: optional string username; + 2: optional i64 jobStartedTime; + 3: optional i64 lastMonitoredTime; + 4: optional string hostId; + 5: optional map parameters; + 6: optional string jobName; + 7: optional i32 failedCount = 0; + // FIXME - Job execution context + //8: + } + +struct JobStatusChangeEvent { + 1: required experimentModel.JobState state; + 2: required JobIdentity jobIdentity; + 3: required JobMonitor jobMonitor; +} + + + + + + + http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/modules/messaging/core/pom.xml ---------------------------------------------------------------------- diff --git a/modules/messaging/core/pom.xml b/modules/messaging/core/pom.xml new file mode 100644 index 0000000..4bb4995 --- /dev/null +++ b/modules/messaging/core/pom.xml @@ -0,0 +1,62 @@ + + + + + + + + org.apache.airavata + messaging + 0.14-SNAPSHOT + ../pom.xml + + + 4.0.0 + airavata-messaging-core + jar + Airavata Messaging Framework Core + http://airavata.apache.org/ + + + + org.slf4j + slf4j-api + + + org.apache.airavata + airavata-gfac-schema-utils + ${project.version} + + + junit + junit + test + + + org.slf4j + jcl-over-slf4j + test + + + org.slf4j + slf4j-log4j12 + test + + + org.apache.airavata + airavata-data-models + ${project.version} + + + org.apache.airavata + airavata-client-configuration + test + + + http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Metadata.java ---------------------------------------------------------------------- diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Metadata.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Metadata.java new file mode 100644 index 0000000..cbf41c1 --- /dev/null +++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Metadata.java @@ -0,0 +1,25 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.apache.airavata.messaging.core; + +public class Metadata { +} http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java ---------------------------------------------------------------------- diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java new file mode 100644 index 0000000..8e84ff0 --- /dev/null +++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Publisher.java @@ -0,0 +1,13 @@ +package org.apache.airavata.messaging.core; + +import org.apache.airavata.model.messaging.event.ExperimentStatusChangeEvent; +import org.apache.airavata.model.messaging.event.JobStatusChangeEvent; +import org.apache.airavata.model.messaging.event.TaskStatusChangeEvent; +import org.apache.airavata.model.messaging.event.WorkflowNodeStatusChangeEvent; + +public interface Publisher { + public void publish(ExperimentStatusChangeEvent event, Metadata metadata); + public void publish(WorkflowNodeStatusChangeEvent event, Metadata metadata); + public void publish(TaskStatusChangeEvent event, Metadata metadata); + public void publish(JobStatusChangeEvent event, Metadata metadata); +} http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/modules/messaging/pom.xml ---------------------------------------------------------------------- diff --git a/modules/messaging/pom.xml b/modules/messaging/pom.xml new file mode 100644 index 0000000..03fe2e4 --- /dev/null +++ b/modules/messaging/pom.xml @@ -0,0 +1,41 @@ + + + + + + + + org.apache.airavata + airavata + 0.14-SNAPSHOT + ../../pom.xml + + + 4.0.0 + messaging + pom + Airavata Messaging Framework + http://airavata.apache.org/ + + + + default + + true + + + core + + + + + UTF-8 + UTF-8 + + http://git-wip-us.apache.org/repos/asf/airavata/blob/1fe3d1d8/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index f15ce48..e0f7176 100644 --- a/pom.xml +++ b/pom.xml @@ -507,6 +507,7 @@ modules/test-suite modules/distribution modules/ws-messenger + modules/messaging modules/integration-tests modules/xbaya-gui