airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [01/23] adding initial messaging framework changes
Date Mon, 06 Oct 2014 19:54:49 GMT
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<WorkflowNodeStatusChangeEvent,
WorkflowNodeStatusChangeEvent._Fields>, java.io.Serializable, Cloneable, Comparable<WorkflowNodeStatusChangeEvent>
{
+  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<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    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 <i>other</i>.
+   */
+  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<WorkflowNodeStatusChangeEvent>
{
+
+    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<WorkflowNodeStatusChangeEvent>
{
+
+    @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<string, string> 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>messaging</artifactId>
+        <version>0.14-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-messaging-core</artifactId>
+    <packaging>jar</packaging>
+    <name>Airavata Messaging Framework Core</name>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-schema-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<scope>test</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-data-models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-configuration</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata</artifactId>
+        <version>0.14-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>messaging</artifactId>
+    <packaging>pom</packaging>
+    <name>Airavata Messaging Framework</name>
+    <url>http://airavata.apache.org/</url>
+
+    <profiles>
+        <profile>
+            <id>default</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>core</module>
+            </modules>
+        </profile>
+    </profiles>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    </properties>
+</project>

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 @@
                 <module>modules/test-suite</module>
                 <module>modules/distribution</module>
                 <module>modules/ws-messenger</module>
+                <module>modules/messaging</module>
                 <module>modules/integration-tests</module>
                 <module>modules/xbaya-gui</module>
             </modules>


Mime
View raw message