airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [17/28] airavata git commit: generating code for messaging
Date Wed, 15 Apr 2015 20:48:53 GMT
generating code for messaging


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0f97741e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0f97741e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0f97741e

Branch: refs/heads/emailMonitoring
Commit: 0f97741eb1b6faf2afd18076b84e0ce534e91e31
Parents: ea88999
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Apr 14 15:57:38 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Apr 14 15:57:38 2015 -0400

----------------------------------------------------------------------
 .../lib/airavata/messagingEvents_types.cpp      |  36 +++-
 .../lib/airavata/messagingEvents_types.h        |  20 +-
 .../Airavata/Model/Messaging/Event/Types.php    |  40 ++++
 .../airavata/model/messaging/event/ttypes.py    |  30 ++-
 .../messaging/event/TaskTerminateEvent.java     | 196 ++++++++++++++++++-
 .../messagingEvents.thrift                      |   2 +
 6 files changed, 316 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0f97741e/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.cpp
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.cpp
index 92f29c6..3b4afc6 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.cpp
@@ -1033,8 +1033,8 @@ void swap(TaskSubmitEvent &a, TaskSubmitEvent &b) {
   swap(a.tokenId, b.tokenId);
 }
 
-const char* TaskTerminateEvent::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
-const uint8_t TaskTerminateEvent::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+const char* TaskTerminateEvent::ascii_fingerprint = "C93D890311F28844166CF6E571EB3AC2";
+const uint8_t TaskTerminateEvent::binary_fingerprint[16] = {0xC9,0x3D,0x89,0x03,0x11,0xF2,0x88,0x44,0x16,0x6C,0xF6,0xE5,0x71,0xEB,0x3A,0xC2};
 
 uint32_t TaskTerminateEvent::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -1049,6 +1049,8 @@ uint32_t TaskTerminateEvent::read(::apache::thrift::protocol::TProtocol*
iprot)
 
   bool isset_experimentId = false;
   bool isset_taskId = false;
+  bool isset_gatewayId = false;
+  bool isset_tokenId = false;
 
   while (true)
   {
@@ -1074,6 +1076,22 @@ uint32_t TaskTerminateEvent::read(::apache::thrift::protocol::TProtocol*
iprot)
           xfer += iprot->skip(ftype);
         }
         break;
+      case 3:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->gatewayId);
+          isset_gatewayId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
+      case 4:
+        if (ftype == ::apache::thrift::protocol::T_STRING) {
+          xfer += iprot->readString(this->tokenId);
+          isset_tokenId = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -1087,6 +1105,10 @@ uint32_t TaskTerminateEvent::read(::apache::thrift::protocol::TProtocol*
iprot)
     throw TProtocolException(TProtocolException::INVALID_DATA);
   if (!isset_taskId)
     throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_gatewayId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
+  if (!isset_tokenId)
+    throw TProtocolException(TProtocolException::INVALID_DATA);
   return xfer;
 }
 
@@ -1102,6 +1124,14 @@ uint32_t TaskTerminateEvent::write(::apache::thrift::protocol::TProtocol*
oprot)
   xfer += oprot->writeString(this->taskId);
   xfer += oprot->writeFieldEnd();
 
+  xfer += oprot->writeFieldBegin("gatewayId", ::apache::thrift::protocol::T_STRING, 3);
+  xfer += oprot->writeString(this->gatewayId);
+  xfer += oprot->writeFieldEnd();
+
+  xfer += oprot->writeFieldBegin("tokenId", ::apache::thrift::protocol::T_STRING, 4);
+  xfer += oprot->writeString(this->tokenId);
+  xfer += oprot->writeFieldEnd();
+
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1111,6 +1141,8 @@ void swap(TaskTerminateEvent &a, TaskTerminateEvent &b) {
   using ::std::swap;
   swap(a.experimentId, b.experimentId);
   swap(a.taskId, b.taskId);
+  swap(a.gatewayId, b.gatewayId);
+  swap(a.tokenId, b.tokenId);
 }
 
 const char* JobStatusChangeEvent::ascii_fingerprint = "062775D589B60D1687103FD465B0F5E8";

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f97741e/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.h
b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.h
index aafcda1..c9d4d85 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/messagingEvents_types.h
@@ -568,16 +568,18 @@ void swap(TaskSubmitEvent &a, TaskSubmitEvent &b);
 class TaskTerminateEvent {
  public:
 
-  static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972";
-  static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+  static const char* ascii_fingerprint; // = "C93D890311F28844166CF6E571EB3AC2";
+  static const uint8_t binary_fingerprint[16]; // = {0xC9,0x3D,0x89,0x03,0x11,0xF2,0x88,0x44,0x16,0x6C,0xF6,0xE5,0x71,0xEB,0x3A,0xC2};
 
-  TaskTerminateEvent() : experimentId(), taskId() {
+  TaskTerminateEvent() : experimentId(), taskId(), gatewayId(), tokenId() {
   }
 
   virtual ~TaskTerminateEvent() throw() {}
 
   std::string experimentId;
   std::string taskId;
+  std::string gatewayId;
+  std::string tokenId;
 
   void __set_experimentId(const std::string& val) {
     experimentId = val;
@@ -587,12 +589,24 @@ class TaskTerminateEvent {
     taskId = val;
   }
 
+  void __set_gatewayId(const std::string& val) {
+    gatewayId = val;
+  }
+
+  void __set_tokenId(const std::string& val) {
+    tokenId = val;
+  }
+
   bool operator == (const TaskTerminateEvent & rhs) const
   {
     if (!(experimentId == rhs.experimentId))
       return false;
     if (!(taskId == rhs.taskId))
       return false;
+    if (!(gatewayId == rhs.gatewayId))
+      return false;
+    if (!(tokenId == rhs.tokenId))
+      return false;
     return true;
   }
   bool operator != (const TaskTerminateEvent &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f97741e/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Messaging/Event/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Messaging/Event/Types.php
b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Messaging/Event/Types.php
index 4c4ec93..035e249 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Messaging/Event/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Messaging/Event/Types.php
@@ -1202,6 +1202,8 @@ class TaskTerminateEvent {
 
   public $experimentId = null;
   public $taskId = null;
+  public $gatewayId = null;
+  public $tokenId = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -1214,6 +1216,14 @@ class TaskTerminateEvent {
           'var' => 'taskId',
           'type' => TType::STRING,
           ),
+        3 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'tokenId',
+          'type' => TType::STRING,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -1223,6 +1233,12 @@ class TaskTerminateEvent {
       if (isset($vals['taskId'])) {
         $this->taskId = $vals['taskId'];
       }
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['tokenId'])) {
+        $this->tokenId = $vals['tokenId'];
+      }
     }
   }
 
@@ -1259,6 +1275,20 @@ class TaskTerminateEvent {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->tokenId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -1282,6 +1312,16 @@ class TaskTerminateEvent {
       $xfer += $output->writeString($this->taskId);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 3);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->tokenId !== null) {
+      $xfer += $output->writeFieldBegin('tokenId', TType::STRING, 4);
+      $xfer += $output->writeString($this->tokenId);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f97741e/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py
b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py
index 5cfac76..f97d273 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py
@@ -973,17 +973,23 @@ class TaskTerminateEvent:
   Attributes:
    - experimentId
    - taskId
+   - gatewayId
+   - tokenId
   """
 
   thrift_spec = (
     None, # 0
     (1, TType.STRING, 'experimentId', None, None, ), # 1
     (2, TType.STRING, 'taskId', None, None, ), # 2
+    (3, TType.STRING, 'gatewayId', None, None, ), # 3
+    (4, TType.STRING, 'tokenId', None, None, ), # 4
   )
 
-  def __init__(self, experimentId=None, taskId=None,):
+  def __init__(self, experimentId=None, taskId=None, gatewayId=None, tokenId=None,):
     self.experimentId = experimentId
     self.taskId = taskId
+    self.gatewayId = gatewayId
+    self.tokenId = tokenId
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans,
TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -1004,6 +1010,16 @@ class TaskTerminateEvent:
           self.taskId = iprot.readString();
         else:
           iprot.skip(ftype)
+      elif fid == 3:
+        if ftype == TType.STRING:
+          self.gatewayId = iprot.readString();
+        else:
+          iprot.skip(ftype)
+      elif fid == 4:
+        if ftype == TType.STRING:
+          self.tokenId = iprot.readString();
+        else:
+          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -1022,6 +1038,14 @@ class TaskTerminateEvent:
       oprot.writeFieldBegin('taskId', TType.STRING, 2)
       oprot.writeString(self.taskId)
       oprot.writeFieldEnd()
+    if self.gatewayId is not None:
+      oprot.writeFieldBegin('gatewayId', TType.STRING, 3)
+      oprot.writeString(self.gatewayId)
+      oprot.writeFieldEnd()
+    if self.tokenId is not None:
+      oprot.writeFieldBegin('tokenId', TType.STRING, 4)
+      oprot.writeString(self.tokenId)
+      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
 
@@ -1030,6 +1054,10 @@ class TaskTerminateEvent:
       raise TProtocol.TProtocolException(message='Required field experimentId is unset!')
     if self.taskId is None:
       raise TProtocol.TProtocolException(message='Required field taskId is unset!')
+    if self.gatewayId is None:
+      raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
+    if self.tokenId is None:
+      raise TProtocol.TProtocolException(message='Required field tokenId is unset!')
     return
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f97741e/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskTerminateEvent.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskTerminateEvent.java
b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskTerminateEvent.java
index 59b9f85..b4c3a2b 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskTerminateEvent.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/messaging/event/TaskTerminateEvent.java
@@ -54,6 +54,8 @@ import org.slf4j.LoggerFactory;
 
   private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId",
org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId",
org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId",
org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId",
org.apache.thrift.protocol.TType.STRING, (short)4);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -63,11 +65,15 @@ import org.slf4j.LoggerFactory;
 
   private String experimentId; // required
   private String taskId; // required
+  private String gatewayId; // required
+  private String tokenId; // 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
{
     EXPERIMENT_ID((short)1, "experimentId"),
-    TASK_ID((short)2, "taskId");
+    TASK_ID((short)2, "taskId"),
+    GATEWAY_ID((short)3, "gatewayId"),
+    TOKEN_ID((short)4, "tokenId");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -86,6 +92,10 @@ import org.slf4j.LoggerFactory;
           return EXPERIMENT_ID;
         case 2: // TASK_ID
           return TASK_ID;
+        case 3: // GATEWAY_ID
+          return GATEWAY_ID;
+        case 4: // TOKEN_ID
+          return TOKEN_ID;
         default:
           return null;
       }
@@ -133,6 +143,10 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED,

         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId",
org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TaskTerminateEvent.class,
metaDataMap);
   }
@@ -142,11 +156,15 @@ import org.slf4j.LoggerFactory;
 
   public TaskTerminateEvent(
     String experimentId,
-    String taskId)
+    String taskId,
+    String gatewayId,
+    String tokenId)
   {
     this();
     this.experimentId = experimentId;
     this.taskId = taskId;
+    this.gatewayId = gatewayId;
+    this.tokenId = tokenId;
   }
 
   /**
@@ -159,6 +177,12 @@ import org.slf4j.LoggerFactory;
     if (other.isSetTaskId()) {
       this.taskId = other.taskId;
     }
+    if (other.isSetGatewayId()) {
+      this.gatewayId = other.gatewayId;
+    }
+    if (other.isSetTokenId()) {
+      this.tokenId = other.tokenId;
+    }
   }
 
   public TaskTerminateEvent deepCopy() {
@@ -169,6 +193,8 @@ import org.slf4j.LoggerFactory;
   public void clear() {
     this.experimentId = null;
     this.taskId = null;
+    this.gatewayId = null;
+    this.tokenId = null;
   }
 
   public String getExperimentId() {
@@ -217,6 +243,52 @@ import org.slf4j.LoggerFactory;
     }
   }
 
+  public String getGatewayId() {
+    return this.gatewayId;
+  }
+
+  public void setGatewayId(String gatewayId) {
+    this.gatewayId = gatewayId;
+  }
+
+  public void unsetGatewayId() {
+    this.gatewayId = null;
+  }
+
+  /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetGatewayId() {
+    return this.gatewayId != null;
+  }
+
+  public void setGatewayIdIsSet(boolean value) {
+    if (!value) {
+      this.gatewayId = null;
+    }
+  }
+
+  public String getTokenId() {
+    return this.tokenId;
+  }
+
+  public void setTokenId(String tokenId) {
+    this.tokenId = tokenId;
+  }
+
+  public void unsetTokenId() {
+    this.tokenId = null;
+  }
+
+  /** Returns true if field tokenId is set (has been assigned a value) and false otherwise
*/
+  public boolean isSetTokenId() {
+    return this.tokenId != null;
+  }
+
+  public void setTokenIdIsSet(boolean value) {
+    if (!value) {
+      this.tokenId = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case EXPERIMENT_ID:
@@ -235,6 +307,22 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case GATEWAY_ID:
+      if (value == null) {
+        unsetGatewayId();
+      } else {
+        setGatewayId((String)value);
+      }
+      break;
+
+    case TOKEN_ID:
+      if (value == null) {
+        unsetTokenId();
+      } else {
+        setTokenId((String)value);
+      }
+      break;
+
     }
   }
 
@@ -246,6 +334,12 @@ import org.slf4j.LoggerFactory;
     case TASK_ID:
       return getTaskId();
 
+    case GATEWAY_ID:
+      return getGatewayId();
+
+    case TOKEN_ID:
+      return getTokenId();
+
     }
     throw new IllegalStateException();
   }
@@ -261,6 +355,10 @@ import org.slf4j.LoggerFactory;
       return isSetExperimentId();
     case TASK_ID:
       return isSetTaskId();
+    case GATEWAY_ID:
+      return isSetGatewayId();
+    case TOKEN_ID:
+      return isSetTokenId();
     }
     throw new IllegalStateException();
   }
@@ -296,6 +394,24 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_gatewayId = true && this.isSetGatewayId();
+    boolean that_present_gatewayId = true && that.isSetGatewayId();
+    if (this_present_gatewayId || that_present_gatewayId) {
+      if (!(this_present_gatewayId && that_present_gatewayId))
+        return false;
+      if (!this.gatewayId.equals(that.gatewayId))
+        return false;
+    }
+
+    boolean this_present_tokenId = true && this.isSetTokenId();
+    boolean that_present_tokenId = true && that.isSetTokenId();
+    if (this_present_tokenId || that_present_tokenId) {
+      if (!(this_present_tokenId && that_present_tokenId))
+        return false;
+      if (!this.tokenId.equals(that.tokenId))
+        return false;
+    }
+
     return true;
   }
 
@@ -332,6 +448,26 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGatewayId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTokenId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -367,6 +503,22 @@ import org.slf4j.LoggerFactory;
       sb.append(this.taskId);
     }
     first = false;
+    if (!first) sb.append(", ");
+    sb.append("gatewayId:");
+    if (this.gatewayId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.gatewayId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("tokenId:");
+    if (this.tokenId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.tokenId);
+    }
+    first = false;
     sb.append(")");
     return sb.toString();
   }
@@ -381,6 +533,14 @@ import org.slf4j.LoggerFactory;
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'taskId' is
unset! Struct:" + toString());
     }
 
+    if (!isSetGatewayId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId'
is unset! Struct:" + toString());
+    }
+
+    if (!isSetTokenId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' is
unset! Struct:" + toString());
+    }
+
     // check for sub-struct validity
   }
 
@@ -434,6 +594,22 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 3: // GATEWAY_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.gatewayId = iprot.readString();
+              struct.setGatewayIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TOKEN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tokenId = iprot.readString();
+              struct.setTokenIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -457,6 +633,16 @@ import org.slf4j.LoggerFactory;
         oprot.writeString(struct.taskId);
         oprot.writeFieldEnd();
       }
+      if (struct.gatewayId != null) {
+        oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+        oprot.writeString(struct.gatewayId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.tokenId != null) {
+        oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+        oprot.writeString(struct.tokenId);
+        oprot.writeFieldEnd();
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -476,6 +662,8 @@ import org.slf4j.LoggerFactory;
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeString(struct.experimentId);
       oprot.writeString(struct.taskId);
+      oprot.writeString(struct.gatewayId);
+      oprot.writeString(struct.tokenId);
     }
 
     @Override
@@ -485,6 +673,10 @@ import org.slf4j.LoggerFactory;
       struct.setExperimentIdIsSet(true);
       struct.taskId = iprot.readString();
       struct.setTaskIdIsSet(true);
+      struct.gatewayId = iprot.readString();
+      struct.setGatewayIdIsSet(true);
+      struct.tokenId = iprot.readString();
+      struct.setTokenIdIsSet(true);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f97741e/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
index 6c386f0..29cdd2e 100644
--- a/airavata-api/thrift-interface-descriptions/messagingEvents.thrift
+++ b/airavata-api/thrift-interface-descriptions/messagingEvents.thrift
@@ -119,6 +119,8 @@ struct TaskSubmitEvent{
 struct TaskTerminateEvent{
     1: required string experimentId,
     2: required string taskId,
+    3: required string gatewayId,
+    4: required string tokenId
 }
 
 struct JobStatusChangeEvent {


Mime
View raw message