airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [34/44] git commit: Removed MonitorMode from JobResourceManager and added it to SSHJobSubmission struct, changed MonitorModes enum values
Date Wed, 05 Nov 2014 18:30:22 GMT
Removed MonitorMode from JobResourceManager and added it to SSHJobSubmission struct, changed MonitorModes enum values


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

Branch: refs/heads/gfac_appcatalog_int
Commit: e28919c984b0b6a0f7f1203b66afb865a79b4e2b
Parents: 73e21be
Author: shamrath <shameerainfo@gmail.com>
Authored: Thu Oct 30 16:34:35 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Wed Nov 5 11:16:15 2014 -0500

----------------------------------------------------------------------
 .../lib/airavata/computeResourceModel_types.cpp | 116 +++++++++---------
 .../lib/airavata/computeResourceModel_types.h   |  60 ++++-----
 .../Model/AppCatalog/ComputeResource/Types.php  |  58 ++++-----
 .../appcatalog/computeresource/MonitorMode.java |  16 +--
 .../computeresource/ResourceJobManager.java     | 121 +------------------
 .../computeresource/SSHJobSubmission.java       | 121 ++++++++++++++++++-
 .../computeResourceModel.thrift                 |  35 +++---
 7 files changed, 264 insertions(+), 263 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
index 27f62dd..25c7bf1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.cpp
@@ -61,16 +61,6 @@ const char* _kJobManagerCommandNames[] = {
 };
 const std::map<int, const char*> _JobManagerCommand_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kJobManagerCommandValues, _kJobManagerCommandNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
-int _kMonitorModeValues[] = {
-  MonitorMode::PUSH,
-  MonitorMode::PULL
-};
-const char* _kMonitorModeNames[] = {
-  "PUSH",
-  "PULL"
-};
-const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
-
 int _kFileSystemsValues[] = {
   FileSystems::HOME,
   FileSystems::WORK,
@@ -119,6 +109,16 @@ const char* _kJobSubmissionProtocolNames[] = {
 };
 const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kJobSubmissionProtocolValues, _kJobSubmissionProtocolNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
+int _kMonitorModeValues[] = {
+  MonitorMode::POLL_JOB_MANAGER,
+  MonitorMode::XSEDE_AMQP_SUBSCRIBE
+};
+const char* _kMonitorModeNames[] = {
+  "POLL_JOB_MANAGER",
+  "XSEDE_AMQP_SUBSCRIBE"
+};
+const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kMonitorModeValues, _kMonitorModeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+
 int _kDataMovementProtocolValues[] = {
   DataMovementProtocol::LOCAL,
   DataMovementProtocol::SCP,
@@ -147,8 +147,8 @@ const char* _kProviderNameNames[] = {
 };
 const std::map<int, const char*> _ProviderName_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kProviderNameValues, _kProviderNameNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
-const char* ResourceJobManager::ascii_fingerprint = "83F3E1FB1C076C79A1E733A1E531B938";
-const uint8_t ResourceJobManager::binary_fingerprint[16] = {0x83,0xF3,0xE1,0xFB,0x1C,0x07,0x6C,0x79,0xA1,0xE7,0x33,0xA1,0xE5,0x31,0xB9,0x38};
+const char* ResourceJobManager::ascii_fingerprint = "F61CAF80247D0E44C8D52504F3A43BED";
+const uint8_t ResourceJobManager::binary_fingerprint[16] = {0xF6,0x1C,0xAF,0x80,0x24,0x7D,0x0E,0x44,0xC8,0xD5,0x25,0x04,0xF3,0xA4,0x3B,0xED};
 
 uint32_t ResourceJobManager::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -231,16 +231,6 @@ uint32_t ResourceJobManager::read(::apache::thrift::protocol::TProtocol* iprot)
           xfer += iprot->skip(ftype);
         }
         break;
-      case 6:
-        if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast9;
-          xfer += iprot->readI32(ecast9);
-          this->monitorMode = (MonitorMode::type)ecast9;
-          this->__isset.monitorMode = true;
-        } else {
-          xfer += iprot->skip(ftype);
-        }
-        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -283,21 +273,16 @@ uint32_t ResourceJobManager::write(::apache::thrift::protocol::TProtocol* oprot)
     xfer += oprot->writeFieldBegin("jobManagerCommands", ::apache::thrift::protocol::T_MAP, 5);
     {
       xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_I32, ::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->jobManagerCommands.size()));
-      std::map<JobManagerCommand::type, std::string> ::const_iterator _iter10;
-      for (_iter10 = this->jobManagerCommands.begin(); _iter10 != this->jobManagerCommands.end(); ++_iter10)
+      std::map<JobManagerCommand::type, std::string> ::const_iterator _iter9;
+      for (_iter9 = this->jobManagerCommands.begin(); _iter9 != this->jobManagerCommands.end(); ++_iter9)
       {
-        xfer += oprot->writeI32((int32_t)_iter10->first);
-        xfer += oprot->writeString(_iter10->second);
+        xfer += oprot->writeI32((int32_t)_iter9->first);
+        xfer += oprot->writeString(_iter9->second);
       }
       xfer += oprot->writeMapEnd();
     }
     xfer += oprot->writeFieldEnd();
   }
-  if (this->__isset.monitorMode) {
-    xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 6);
-    xfer += oprot->writeI32((int32_t)this->monitorMode);
-    xfer += oprot->writeFieldEnd();
-  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -310,7 +295,6 @@ void swap(ResourceJobManager &a, ResourceJobManager &b) {
   swap(a.pushMonitoringEndpoint, b.pushMonitoringEndpoint);
   swap(a.jobManagerBinPath, b.jobManagerBinPath);
   swap(a.jobManagerCommands, b.jobManagerCommands);
-  swap(a.monitorMode, b.monitorMode);
   swap(a.__isset, b.__isset);
 }
 
@@ -484,9 +468,9 @@ uint32_t SCPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot) {
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast11;
-          xfer += iprot->readI32(ecast11);
-          this->securityProtocol = (SecurityProtocol::type)ecast11;
+          int32_t ecast10;
+          xfer += iprot->readI32(ecast10);
+          this->securityProtocol = (SecurityProtocol::type)ecast10;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -596,9 +580,9 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast12;
-          xfer += iprot->readI32(ecast12);
-          this->securityProtocol = (SecurityProtocol::type)ecast12;
+          int32_t ecast11;
+          xfer += iprot->readI32(ecast11);
+          this->securityProtocol = (SecurityProtocol::type)ecast11;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -608,14 +592,14 @@ uint32_t GridFTPDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         if (ftype == ::apache::thrift::protocol::T_LIST) {
           {
             this->gridFTPEndPoints.clear();
-            uint32_t _size13;
-            ::apache::thrift::protocol::TType _etype16;
-            xfer += iprot->readListBegin(_etype16, _size13);
-            this->gridFTPEndPoints.resize(_size13);
-            uint32_t _i17;
-            for (_i17 = 0; _i17 < _size13; ++_i17)
+            uint32_t _size12;
+            ::apache::thrift::protocol::TType _etype15;
+            xfer += iprot->readListBegin(_etype15, _size12);
+            this->gridFTPEndPoints.resize(_size12);
+            uint32_t _i16;
+            for (_i16 = 0; _i16 < _size12; ++_i16)
             {
-              xfer += iprot->readString(this->gridFTPEndPoints[_i17]);
+              xfer += iprot->readString(this->gridFTPEndPoints[_i16]);
             }
             xfer += iprot->readListEnd();
           }
@@ -657,10 +641,10 @@ uint32_t GridFTPDataMovement::write(::apache::thrift::protocol::TProtocol* oprot
   xfer += oprot->writeFieldBegin("gridFTPEndPoints", ::apache::thrift::protocol::T_LIST, 3);
   {
     xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->gridFTPEndPoints.size()));
-    std::vector<std::string> ::const_iterator _iter18;
-    for (_iter18 = this->gridFTPEndPoints.begin(); _iter18 != this->gridFTPEndPoints.end(); ++_iter18)
+    std::vector<std::string> ::const_iterator _iter17;
+    for (_iter17 = this->gridFTPEndPoints.begin(); _iter17 != this->gridFTPEndPoints.end(); ++_iter17)
     {
-      xfer += oprot->writeString((*_iter18));
+      xfer += oprot->writeString((*_iter17));
     }
     xfer += oprot->writeListEnd();
   }
@@ -714,9 +698,9 @@ uint32_t UnicoreDataMovement::read(::apache::thrift::protocol::TProtocol* iprot)
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast19;
-          xfer += iprot->readI32(ecast19);
-          this->securityProtocol = (SecurityProtocol::type)ecast19;
+          int32_t ecast18;
+          xfer += iprot->readI32(ecast18);
+          this->securityProtocol = (SecurityProtocol::type)ecast18;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -776,8 +760,8 @@ void swap(UnicoreDataMovement &a, UnicoreDataMovement &b) {
   swap(a.unicoreEndPointURL, b.unicoreEndPointURL);
 }
 
-const char* LOCALSubmission::ascii_fingerprint = "D51508D1A661370F4785A01334DB8637";
-const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xD5,0x15,0x08,0xD1,0xA6,0x61,0x37,0x0F,0x47,0x85,0xA0,0x13,0x34,0xDB,0x86,0x37};
+const char* LOCALSubmission::ascii_fingerprint = "A5A35C842CBE1CA9D6A13C5974C6FB8F";
+const uint8_t LOCALSubmission::binary_fingerprint[16] = {0xA5,0xA3,0x5C,0x84,0x2C,0xBE,0x1C,0xA9,0xD6,0xA1,0x3C,0x59,0x74,0xC6,0xFB,0x8F};
 
 uint32_t LOCALSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -920,8 +904,8 @@ void swap(LOCALDataMovement &a, LOCALDataMovement &b) {
   swap(a.dataMovementInterfaceId, b.dataMovementInterfaceId);
 }
 
-const char* SSHJobSubmission::ascii_fingerprint = "BCAF073DD81C8F6A9ED716A45569D2B3";
-const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xBC,0xAF,0x07,0x3D,0xD8,0x1C,0x8F,0x6A,0x9E,0xD7,0x16,0xA4,0x55,0x69,0xD2,0xB3};
+const char* SSHJobSubmission::ascii_fingerprint = "A62183DAA7AFF027173705420A9D99D0";
+const uint8_t SSHJobSubmission::binary_fingerprint[16] = {0xA6,0x21,0x83,0xDA,0xA7,0xAF,0xF0,0x27,0x17,0x37,0x05,0x42,0x0A,0x9D,0x99,0xD0};
 
 uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
 
@@ -956,9 +940,9 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
         break;
       case 2:
         if (ftype == ::apache::thrift::protocol::T_I32) {
-          int32_t ecast20;
-          xfer += iprot->readI32(ecast20);
-          this->securityProtocol = (SecurityProtocol::type)ecast20;
+          int32_t ecast19;
+          xfer += iprot->readI32(ecast19);
+          this->securityProtocol = (SecurityProtocol::type)ecast19;
           isset_securityProtocol = true;
         } else {
           xfer += iprot->skip(ftype);
@@ -988,6 +972,16 @@ uint32_t SSHJobSubmission::read(::apache::thrift::protocol::TProtocol* iprot) {
           xfer += iprot->skip(ftype);
         }
         break;
+      case 6:
+        if (ftype == ::apache::thrift::protocol::T_I32) {
+          int32_t ecast20;
+          xfer += iprot->readI32(ecast20);
+          this->monitorMode = (MonitorMode::type)ecast20;
+          this->__isset.monitorMode = true;
+        } else {
+          xfer += iprot->skip(ftype);
+        }
+        break;
       default:
         xfer += iprot->skip(ftype);
         break;
@@ -1032,6 +1026,11 @@ uint32_t SSHJobSubmission::write(::apache::thrift::protocol::TProtocol* oprot) c
     xfer += oprot->writeI32(this->sshPort);
     xfer += oprot->writeFieldEnd();
   }
+  if (this->__isset.monitorMode) {
+    xfer += oprot->writeFieldBegin("monitorMode", ::apache::thrift::protocol::T_I32, 6);
+    xfer += oprot->writeI32((int32_t)this->monitorMode);
+    xfer += oprot->writeFieldEnd();
+  }
   xfer += oprot->writeFieldStop();
   xfer += oprot->writeStructEnd();
   return xfer;
@@ -1044,6 +1043,7 @@ void swap(SSHJobSubmission &a, SSHJobSubmission &b) {
   swap(a.resourceJobManager, b.resourceJobManager);
   swap(a.alternativeSSHHostName, b.alternativeSSHHostName);
   swap(a.sshPort, b.sshPort);
+  swap(a.monitorMode, b.monitorMode);
   swap(a.__isset, b.__isset);
 }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
index e94520d..582b2d1 100644
--- a/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
+++ b/airavata-api/airavata-client-sdks/airavata-cpp-sdk/src/main/resources/lib/airavata/computeResourceModel_types.h
@@ -59,15 +59,6 @@ struct JobManagerCommand {
 
 extern const std::map<int, const char*> _JobManagerCommand_VALUES_TO_NAMES;
 
-struct MonitorMode {
-  enum type {
-    PUSH = 0,
-    PULL = 1
-  };
-};
-
-extern const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES;
-
 struct FileSystems {
   enum type {
     HOME = 0,
@@ -104,6 +95,15 @@ struct JobSubmissionProtocol {
 
 extern const std::map<int, const char*> _JobSubmissionProtocol_VALUES_TO_NAMES;
 
+struct MonitorMode {
+  enum type {
+    POLL_JOB_MANAGER = 0,
+    XSEDE_AMQP_SUBSCRIBE = 1
+  };
+};
+
+extern const std::map<int, const char*> _MonitorMode_VALUES_TO_NAMES;
+
 struct DataMovementProtocol {
   enum type {
     LOCAL = 0,
@@ -127,20 +127,19 @@ struct ProviderName {
 extern const std::map<int, const char*> _ProviderName_VALUES_TO_NAMES;
 
 typedef struct _ResourceJobManager__isset {
-  _ResourceJobManager__isset() : pushMonitoringEndpoint(false), jobManagerBinPath(false), jobManagerCommands(false), monitorMode(false) {}
+  _ResourceJobManager__isset() : pushMonitoringEndpoint(false), jobManagerBinPath(false), jobManagerCommands(false) {}
   bool pushMonitoringEndpoint;
   bool jobManagerBinPath;
   bool jobManagerCommands;
-  bool monitorMode;
 } _ResourceJobManager__isset;
 
 class ResourceJobManager {
  public:
 
-  static const char* ascii_fingerprint; // = "83F3E1FB1C076C79A1E733A1E531B938";
-  static const uint8_t binary_fingerprint[16]; // = {0x83,0xF3,0xE1,0xFB,0x1C,0x07,0x6C,0x79,0xA1,0xE7,0x33,0xA1,0xE5,0x31,0xB9,0x38};
+  static const char* ascii_fingerprint; // = "F61CAF80247D0E44C8D52504F3A43BED";
+  static const uint8_t binary_fingerprint[16]; // = {0xF6,0x1C,0xAF,0x80,0x24,0x7D,0x0E,0x44,0xC8,0xD5,0x25,0x04,0xF3,0xA4,0x3B,0xED};
 
-  ResourceJobManager() : resourceJobManagerId("DO_NOT_SET_AT_CLIENTS"), resourceJobManagerType((ResourceJobManagerType::type)0), pushMonitoringEndpoint(), jobManagerBinPath(), monitorMode((MonitorMode::type)0) {
+  ResourceJobManager() : resourceJobManagerId("DO_NOT_SET_AT_CLIENTS"), resourceJobManagerType((ResourceJobManagerType::type)0), pushMonitoringEndpoint(), jobManagerBinPath() {
   }
 
   virtual ~ResourceJobManager() throw() {}
@@ -150,7 +149,6 @@ class ResourceJobManager {
   std::string pushMonitoringEndpoint;
   std::string jobManagerBinPath;
   std::map<JobManagerCommand::type, std::string>  jobManagerCommands;
-  MonitorMode::type monitorMode;
 
   _ResourceJobManager__isset __isset;
 
@@ -177,11 +175,6 @@ class ResourceJobManager {
     __isset.jobManagerCommands = true;
   }
 
-  void __set_monitorMode(const MonitorMode::type val) {
-    monitorMode = val;
-    __isset.monitorMode = true;
-  }
-
   bool operator == (const ResourceJobManager & rhs) const
   {
     if (!(resourceJobManagerId == rhs.resourceJobManagerId))
@@ -200,10 +193,6 @@ class ResourceJobManager {
       return false;
     else if (__isset.jobManagerCommands && !(jobManagerCommands == rhs.jobManagerCommands))
       return false;
-    if (__isset.monitorMode != rhs.__isset.monitorMode)
-      return false;
-    else if (__isset.monitorMode && !(monitorMode == rhs.monitorMode))
-      return false;
     return true;
   }
   bool operator != (const ResourceJobManager &rhs) const {
@@ -493,8 +482,8 @@ void swap(UnicoreDataMovement &a, UnicoreDataMovement &b);
 class LOCALSubmission {
  public:
 
-  static const char* ascii_fingerprint; // = "D51508D1A661370F4785A01334DB8637";
-  static const uint8_t binary_fingerprint[16]; // = {0xD5,0x15,0x08,0xD1,0xA6,0x61,0x37,0x0F,0x47,0x85,0xA0,0x13,0x34,0xDB,0x86,0x37};
+  static const char* ascii_fingerprint; // = "A5A35C842CBE1CA9D6A13C5974C6FB8F";
+  static const uint8_t binary_fingerprint[16]; // = {0xA5,0xA3,0x5C,0x84,0x2C,0xBE,0x1C,0xA9,0xD6,0xA1,0x3C,0x59,0x74,0xC6,0xFB,0x8F};
 
   LOCALSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS") {
   }
@@ -571,18 +560,19 @@ class LOCALDataMovement {
 void swap(LOCALDataMovement &a, LOCALDataMovement &b);
 
 typedef struct _SSHJobSubmission__isset {
-  _SSHJobSubmission__isset() : alternativeSSHHostName(false), sshPort(true) {}
+  _SSHJobSubmission__isset() : alternativeSSHHostName(false), sshPort(true), monitorMode(false) {}
   bool alternativeSSHHostName;
   bool sshPort;
+  bool monitorMode;
 } _SSHJobSubmission__isset;
 
 class SSHJobSubmission {
  public:
 
-  static const char* ascii_fingerprint; // = "BCAF073DD81C8F6A9ED716A45569D2B3";
-  static const uint8_t binary_fingerprint[16]; // = {0xBC,0xAF,0x07,0x3D,0xD8,0x1C,0x8F,0x6A,0x9E,0xD7,0x16,0xA4,0x55,0x69,0xD2,0xB3};
+  static const char* ascii_fingerprint; // = "A62183DAA7AFF027173705420A9D99D0";
+  static const uint8_t binary_fingerprint[16]; // = {0xA6,0x21,0x83,0xDA,0xA7,0xAF,0xF0,0x27,0x17,0x37,0x05,0x42,0x0A,0x9D,0x99,0xD0};
 
-  SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22) {
+  SSHJobSubmission() : jobSubmissionInterfaceId("DO_NOT_SET_AT_CLIENTS"), securityProtocol((SecurityProtocol::type)0), alternativeSSHHostName(), sshPort(22), monitorMode((MonitorMode::type)0) {
   }
 
   virtual ~SSHJobSubmission() throw() {}
@@ -592,6 +582,7 @@ class SSHJobSubmission {
   ResourceJobManager resourceJobManager;
   std::string alternativeSSHHostName;
   int32_t sshPort;
+  MonitorMode::type monitorMode;
 
   _SSHJobSubmission__isset __isset;
 
@@ -617,6 +608,11 @@ class SSHJobSubmission {
     __isset.sshPort = true;
   }
 
+  void __set_monitorMode(const MonitorMode::type val) {
+    monitorMode = val;
+    __isset.monitorMode = true;
+  }
+
   bool operator == (const SSHJobSubmission & rhs) const
   {
     if (!(jobSubmissionInterfaceId == rhs.jobSubmissionInterfaceId))
@@ -633,6 +629,10 @@ class SSHJobSubmission {
       return false;
     else if (__isset.sshPort && !(sshPort == rhs.sshPort))
       return false;
+    if (__isset.monitorMode != rhs.__isset.monitorMode)
+      return false;
+    else if (__isset.monitorMode && !(monitorMode == rhs.monitorMode))
+      return false;
     return true;
   }
   bool operator != (const SSHJobSubmission &rhs) const {

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 3d7b921..9623821 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -49,15 +49,6 @@ final class JobManagerCommand {
   );
 }
 
-final class MonitorMode {
-  const PUSH = 0;
-  const PULL = 1;
-  static public $__names = array(
-    0 => 'PUSH',
-    1 => 'PULL',
-  );
-}
-
 final class FileSystems {
   const HOME = 0;
   const WORK = 1;
@@ -103,6 +94,15 @@ final class JobSubmissionProtocol {
   );
 }
 
+final class MonitorMode {
+  const POLL_JOB_MANAGER = 0;
+  const XSEDE_AMQP_SUBSCRIBE = 1;
+  static public $__names = array(
+    0 => 'POLL_JOB_MANAGER',
+    1 => 'XSEDE_AMQP_SUBSCRIBE',
+  );
+}
+
 final class DataMovementProtocol {
   const LOCAL = 0;
   const SCP = 1;
@@ -137,7 +137,6 @@ class ResourceJobManager {
   public $pushMonitoringEndpoint = null;
   public $jobManagerBinPath = null;
   public $jobManagerCommands = null;
-  public $monitorMode = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -170,10 +169,6 @@ class ResourceJobManager {
             'type' => TType::STRING,
             ),
           ),
-        6 => array(
-          'var' => 'monitorMode',
-          'type' => TType::I32,
-          ),
         );
     }
     if (is_array($vals)) {
@@ -192,9 +187,6 @@ class ResourceJobManager {
       if (isset($vals['jobManagerCommands'])) {
         $this->jobManagerCommands = $vals['jobManagerCommands'];
       }
-      if (isset($vals['monitorMode'])) {
-        $this->monitorMode = $vals['monitorMode'];
-      }
     }
   }
 
@@ -265,13 +257,6 @@ class ResourceJobManager {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 6:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->monitorMode);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -323,11 +308,6 @@ class ResourceJobManager {
       }
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->monitorMode !== null) {
-      $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 6);
-      $xfer += $output->writeI32($this->monitorMode);
-      $xfer += $output->writeFieldEnd();
-    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
@@ -1066,6 +1046,7 @@ class SSHJobSubmission {
   public $resourceJobManager = null;
   public $alternativeSSHHostName = null;
   public $sshPort = 22;
+  public $monitorMode = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
@@ -1091,6 +1072,10 @@ class SSHJobSubmission {
           'var' => 'sshPort',
           'type' => TType::I32,
           ),
+        6 => array(
+          'var' => 'monitorMode',
+          'type' => TType::I32,
+          ),
         );
     }
     if (is_array($vals)) {
@@ -1109,6 +1094,9 @@ class SSHJobSubmission {
       if (isset($vals['sshPort'])) {
         $this->sshPort = $vals['sshPort'];
       }
+      if (isset($vals['monitorMode'])) {
+        $this->monitorMode = $vals['monitorMode'];
+      }
     }
   }
 
@@ -1167,6 +1155,13 @@ class SSHJobSubmission {
             $xfer += $input->skip($ftype);
           }
           break;
+        case 6:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->monitorMode);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
         default:
           $xfer += $input->skip($ftype);
           break;
@@ -1208,6 +1203,11 @@ class SSHJobSubmission {
       $xfer += $output->writeI32($this->sshPort);
       $xfer += $output->writeFieldEnd();
     }
+    if ($this->monitorMode !== null) {
+      $xfer += $output->writeFieldBegin('monitorMode', TType::I32, 6);
+      $xfer += $output->writeI32($this->monitorMode);
+      $xfer += $output->writeFieldEnd();
+    }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
index 30528b7..2545711 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/MonitorMode.java
@@ -31,17 +31,17 @@ import org.apache.thrift.TEnum;
 /**
  * Monitoring modes
  * 
- * PUSH:
- * Server will push job status changes.
+ * POLL_JOB_MANAGER:
+ * GFac need to pull job status changes.
  * 
- * PULL:
- * Need to pull and get the Job status changes.
+ * XSEDE_AMQP_SUBSCRIBE:
+ * Server will publish job status changes to amqp servert.
  * 
  * 
  */
 @SuppressWarnings("all") public enum MonitorMode implements org.apache.thrift.TEnum {
-  PUSH(0),
-  PULL(1);
+  POLL_JOB_MANAGER(0),
+  XSEDE_AMQP_SUBSCRIBE(1);
 
   private final int value;
 
@@ -63,9 +63,9 @@ import org.apache.thrift.TEnum;
   public static MonitorMode findByValue(int value) { 
     switch (value) {
       case 0:
-        return PUSH;
+        return POLL_JOB_MANAGER;
       case 1:
-        return PULL;
+        return XSEDE_AMQP_SUBSCRIBE;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
index d0487b1..680a40a 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/ResourceJobManager.java
@@ -74,7 +74,6 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField PUSH_MONITORING_ENDPOINT_FIELD_DESC = new org.apache.thrift.protocol.TField("pushMonitoringEndpoint", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField JOB_MANAGER_BIN_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManagerBinPath", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField JOB_MANAGER_COMMANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("jobManagerCommands", org.apache.thrift.protocol.TType.MAP, (short)5);
-  private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.I32, (short)6);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -87,7 +86,6 @@ import org.slf4j.LoggerFactory;
   private String pushMonitoringEndpoint; // optional
   private String jobManagerBinPath; // optional
   private Map<JobManagerCommand,String> jobManagerCommands; // optional
-  private MonitorMode monitorMode; // optional
 
   /** 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 {
@@ -99,12 +97,7 @@ import org.slf4j.LoggerFactory;
     RESOURCE_JOB_MANAGER_TYPE((short)2, "resourceJobManagerType"),
     PUSH_MONITORING_ENDPOINT((short)3, "pushMonitoringEndpoint"),
     JOB_MANAGER_BIN_PATH((short)4, "jobManagerBinPath"),
-    JOB_MANAGER_COMMANDS((short)5, "jobManagerCommands"),
-    /**
-     * 
-     * @see MonitorMode
-     */
-    MONITOR_MODE((short)6, "monitorMode");
+    JOB_MANAGER_COMMANDS((short)5, "jobManagerCommands");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -129,8 +122,6 @@ import org.slf4j.LoggerFactory;
           return JOB_MANAGER_BIN_PATH;
         case 5: // JOB_MANAGER_COMMANDS
           return JOB_MANAGER_COMMANDS;
-        case 6: // MONITOR_MODE
-          return MONITOR_MODE;
         default:
           return null;
       }
@@ -171,7 +162,7 @@ import org.slf4j.LoggerFactory;
   }
 
   // isset id assignments
-  private _Fields optionals[] = {_Fields.PUSH_MONITORING_ENDPOINT,_Fields.JOB_MANAGER_BIN_PATH,_Fields.JOB_MANAGER_COMMANDS,_Fields.MONITOR_MODE};
+  private _Fields optionals[] = {_Fields.PUSH_MONITORING_ENDPOINT,_Fields.JOB_MANAGER_BIN_PATH,_Fields.JOB_MANAGER_COMMANDS};
   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);
@@ -187,8 +178,6 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
             new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobManagerCommand.class), 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-    tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MonitorMode.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ResourceJobManager.class, metaDataMap);
   }
@@ -238,9 +227,6 @@ import org.slf4j.LoggerFactory;
       }
       this.jobManagerCommands = __this__jobManagerCommands;
     }
-    if (other.isSetMonitorMode()) {
-      this.monitorMode = other.monitorMode;
-    }
   }
 
   public ResourceJobManager deepCopy() {
@@ -255,7 +241,6 @@ import org.slf4j.LoggerFactory;
     this.pushMonitoringEndpoint = null;
     this.jobManagerBinPath = null;
     this.jobManagerCommands = null;
-    this.monitorMode = null;
   }
 
   public String getResourceJobManagerId() {
@@ -392,37 +377,6 @@ import org.slf4j.LoggerFactory;
     }
   }
 
-  /**
-   * 
-   * @see MonitorMode
-   */
-  public MonitorMode getMonitorMode() {
-    return this.monitorMode;
-  }
-
-  /**
-   * 
-   * @see MonitorMode
-   */
-  public void setMonitorMode(MonitorMode monitorMode) {
-    this.monitorMode = monitorMode;
-  }
-
-  public void unsetMonitorMode() {
-    this.monitorMode = null;
-  }
-
-  /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
-  public boolean isSetMonitorMode() {
-    return this.monitorMode != null;
-  }
-
-  public void setMonitorModeIsSet(boolean value) {
-    if (!value) {
-      this.monitorMode = null;
-    }
-  }
-
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case RESOURCE_JOB_MANAGER_ID:
@@ -465,14 +419,6 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
-    case MONITOR_MODE:
-      if (value == null) {
-        unsetMonitorMode();
-      } else {
-        setMonitorMode((MonitorMode)value);
-      }
-      break;
-
     }
   }
 
@@ -493,9 +439,6 @@ import org.slf4j.LoggerFactory;
     case JOB_MANAGER_COMMANDS:
       return getJobManagerCommands();
 
-    case MONITOR_MODE:
-      return getMonitorMode();
-
     }
     throw new IllegalStateException();
   }
@@ -517,8 +460,6 @@ import org.slf4j.LoggerFactory;
       return isSetJobManagerBinPath();
     case JOB_MANAGER_COMMANDS:
       return isSetJobManagerCommands();
-    case MONITOR_MODE:
-      return isSetMonitorMode();
     }
     throw new IllegalStateException();
   }
@@ -581,15 +522,6 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
-    boolean this_present_monitorMode = true && this.isSetMonitorMode();
-    boolean that_present_monitorMode = true && that.isSetMonitorMode();
-    if (this_present_monitorMode || that_present_monitorMode) {
-      if (!(this_present_monitorMode && that_present_monitorMode))
-        return false;
-      if (!this.monitorMode.equals(that.monitorMode))
-        return false;
-    }
-
     return true;
   }
 
@@ -656,16 +588,6 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetMonitorMode()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     return 0;
   }
 
@@ -731,16 +653,6 @@ import org.slf4j.LoggerFactory;
       }
       first = false;
     }
-    if (isSetMonitorMode()) {
-      if (!first) sb.append(", ");
-      sb.append("monitorMode:");
-      if (this.monitorMode == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.monitorMode);
-      }
-      first = false;
-    }
     sb.append(")");
     return sb.toString();
   }
@@ -844,14 +756,6 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 6: // MONITOR_MODE
-            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
-              struct.setMonitorModeIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -904,13 +808,6 @@ import org.slf4j.LoggerFactory;
           oprot.writeFieldEnd();
         }
       }
-      if (struct.monitorMode != null) {
-        if (struct.isSetMonitorMode()) {
-          oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
-          oprot.writeI32(struct.monitorMode.getValue());
-          oprot.writeFieldEnd();
-        }
-      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -940,10 +837,7 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetJobManagerCommands()) {
         optionals.set(2);
       }
-      if (struct.isSetMonitorMode()) {
-        optionals.set(3);
-      }
-      oprot.writeBitSet(optionals, 4);
+      oprot.writeBitSet(optionals, 3);
       if (struct.isSetPushMonitoringEndpoint()) {
         oprot.writeString(struct.pushMonitoringEndpoint);
       }
@@ -960,9 +854,6 @@ import org.slf4j.LoggerFactory;
           }
         }
       }
-      if (struct.isSetMonitorMode()) {
-        oprot.writeI32(struct.monitorMode.getValue());
-      }
     }
 
     @Override
@@ -972,7 +863,7 @@ import org.slf4j.LoggerFactory;
       struct.setResourceJobManagerIdIsSet(true);
       struct.resourceJobManagerType = ResourceJobManagerType.findByValue(iprot.readI32());
       struct.setResourceJobManagerTypeIsSet(true);
-      BitSet incoming = iprot.readBitSet(4);
+      BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         struct.pushMonitoringEndpoint = iprot.readString();
         struct.setPushMonitoringEndpointIsSet(true);
@@ -996,10 +887,6 @@ import org.slf4j.LoggerFactory;
         }
         struct.setJobManagerCommandsIsSet(true);
       }
-      if (incoming.get(3)) {
-        struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
-        struct.setMonitorModeIsSet(true);
-      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
index ef786de..4c19d31 100644
--- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SSHJobSubmission.java
@@ -66,6 +66,7 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField RESOURCE_JOB_MANAGER_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceJobManager", org.apache.thrift.protocol.TType.STRUCT, (short)3);
   private static final org.apache.thrift.protocol.TField ALTERNATIVE_SSHHOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("alternativeSSHHostName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField SSH_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sshPort", org.apache.thrift.protocol.TType.I32, (short)5);
+  private static final org.apache.thrift.protocol.TField MONITOR_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("monitorMode", org.apache.thrift.protocol.TType.I32, (short)6);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -78,6 +79,7 @@ import org.slf4j.LoggerFactory;
   private ResourceJobManager resourceJobManager; // required
   private String alternativeSSHHostName; // optional
   private int sshPort; // optional
+  private MonitorMode monitorMode; // optional
 
   /** 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 {
@@ -89,7 +91,12 @@ import org.slf4j.LoggerFactory;
     SECURITY_PROTOCOL((short)2, "securityProtocol"),
     RESOURCE_JOB_MANAGER((short)3, "resourceJobManager"),
     ALTERNATIVE_SSHHOST_NAME((short)4, "alternativeSSHHostName"),
-    SSH_PORT((short)5, "sshPort");
+    SSH_PORT((short)5, "sshPort"),
+    /**
+     * 
+     * @see MonitorMode
+     */
+    MONITOR_MODE((short)6, "monitorMode");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -114,6 +121,8 @@ import org.slf4j.LoggerFactory;
           return ALTERNATIVE_SSHHOST_NAME;
         case 5: // SSH_PORT
           return SSH_PORT;
+        case 6: // MONITOR_MODE
+          return MONITOR_MODE;
         default:
           return null;
       }
@@ -156,7 +165,7 @@ import org.slf4j.LoggerFactory;
   // isset id assignments
   private static final int __SSHPORT_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private _Fields optionals[] = {_Fields.ALTERNATIVE_SSHHOST_NAME,_Fields.SSH_PORT};
+  private _Fields optionals[] = {_Fields.ALTERNATIVE_SSHHOST_NAME,_Fields.SSH_PORT,_Fields.MONITOR_MODE};
   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);
@@ -170,6 +179,8 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.SSH_PORT, new org.apache.thrift.meta_data.FieldMetaData("sshPort", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.MONITOR_MODE, new org.apache.thrift.meta_data.FieldMetaData("monitorMode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, MonitorMode.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SSHJobSubmission.class, metaDataMap);
   }
@@ -210,6 +221,9 @@ import org.slf4j.LoggerFactory;
       this.alternativeSSHHostName = other.alternativeSSHHostName;
     }
     this.sshPort = other.sshPort;
+    if (other.isSetMonitorMode()) {
+      this.monitorMode = other.monitorMode;
+    }
   }
 
   public SSHJobSubmission deepCopy() {
@@ -225,6 +239,7 @@ import org.slf4j.LoggerFactory;
     this.alternativeSSHHostName = null;
     this.sshPort = 22;
 
+    this.monitorMode = null;
   }
 
   public String getJobSubmissionInterfaceId() {
@@ -349,6 +364,37 @@ import org.slf4j.LoggerFactory;
     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSHPORT_ISSET_ID, value);
   }
 
+  /**
+   * 
+   * @see MonitorMode
+   */
+  public MonitorMode getMonitorMode() {
+    return this.monitorMode;
+  }
+
+  /**
+   * 
+   * @see MonitorMode
+   */
+  public void setMonitorMode(MonitorMode monitorMode) {
+    this.monitorMode = monitorMode;
+  }
+
+  public void unsetMonitorMode() {
+    this.monitorMode = null;
+  }
+
+  /** Returns true if field monitorMode is set (has been assigned a value) and false otherwise */
+  public boolean isSetMonitorMode() {
+    return this.monitorMode != null;
+  }
+
+  public void setMonitorModeIsSet(boolean value) {
+    if (!value) {
+      this.monitorMode = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case JOB_SUBMISSION_INTERFACE_ID:
@@ -391,6 +437,14 @@ import org.slf4j.LoggerFactory;
       }
       break;
 
+    case MONITOR_MODE:
+      if (value == null) {
+        unsetMonitorMode();
+      } else {
+        setMonitorMode((MonitorMode)value);
+      }
+      break;
+
     }
   }
 
@@ -411,6 +465,9 @@ import org.slf4j.LoggerFactory;
     case SSH_PORT:
       return Integer.valueOf(getSshPort());
 
+    case MONITOR_MODE:
+      return getMonitorMode();
+
     }
     throw new IllegalStateException();
   }
@@ -432,6 +489,8 @@ import org.slf4j.LoggerFactory;
       return isSetAlternativeSSHHostName();
     case SSH_PORT:
       return isSetSshPort();
+    case MONITOR_MODE:
+      return isSetMonitorMode();
     }
     throw new IllegalStateException();
   }
@@ -494,6 +553,15 @@ import org.slf4j.LoggerFactory;
         return false;
     }
 
+    boolean this_present_monitorMode = true && this.isSetMonitorMode();
+    boolean that_present_monitorMode = true && that.isSetMonitorMode();
+    if (this_present_monitorMode || that_present_monitorMode) {
+      if (!(this_present_monitorMode && that_present_monitorMode))
+        return false;
+      if (!this.monitorMode.equals(that.monitorMode))
+        return false;
+    }
+
     return true;
   }
 
@@ -560,6 +628,16 @@ import org.slf4j.LoggerFactory;
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetMonitorMode()).compareTo(other.isSetMonitorMode());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMonitorMode()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.monitorMode, other.monitorMode);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -619,6 +697,16 @@ import org.slf4j.LoggerFactory;
       sb.append(this.sshPort);
       first = false;
     }
+    if (isSetMonitorMode()) {
+      if (!first) sb.append(", ");
+      sb.append("monitorMode:");
+      if (this.monitorMode == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.monitorMode);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -720,6 +808,14 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
+          case 6: // MONITOR_MODE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
+              struct.setMonitorModeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
@@ -760,6 +856,13 @@ import org.slf4j.LoggerFactory;
         oprot.writeI32(struct.sshPort);
         oprot.writeFieldEnd();
       }
+      if (struct.monitorMode != null) {
+        if (struct.isSetMonitorMode()) {
+          oprot.writeFieldBegin(MONITOR_MODE_FIELD_DESC);
+          oprot.writeI32(struct.monitorMode.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -787,13 +890,19 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetSshPort()) {
         optionals.set(1);
       }
-      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetMonitorMode()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
       if (struct.isSetAlternativeSSHHostName()) {
         oprot.writeString(struct.alternativeSSHHostName);
       }
       if (struct.isSetSshPort()) {
         oprot.writeI32(struct.sshPort);
       }
+      if (struct.isSetMonitorMode()) {
+        oprot.writeI32(struct.monitorMode.getValue());
+      }
     }
 
     @Override
@@ -806,7 +915,7 @@ import org.slf4j.LoggerFactory;
       struct.resourceJobManager = new ResourceJobManager();
       struct.resourceJobManager.read(iprot);
       struct.setResourceJobManagerIsSet(true);
-      BitSet incoming = iprot.readBitSet(2);
+      BitSet incoming = iprot.readBitSet(3);
       if (incoming.get(0)) {
         struct.alternativeSSHHostName = iprot.readString();
         struct.setAlternativeSSHHostNameIsSet(true);
@@ -815,6 +924,10 @@ import org.slf4j.LoggerFactory;
         struct.sshPort = iprot.readI32();
         struct.setSshPortIsSet(true);
       }
+      if (incoming.get(2)) {
+        struct.monitorMode = MonitorMode.findByValue(iprot.readI32());
+        struct.setMonitorModeIsSet(true);
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/e28919c9/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
index 80a70df..3d0472d 100644
--- a/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/computeResourceModel.thrift
@@ -82,20 +82,6 @@ enum JobManagerCommand {
     SHOW_START
 }
 
-/**
-* Monitoring modes
-*
-* PUSH:
-* Server will push job status changes.
-*
-* PULL:
-* Need to pull and get the Job status changes.
-*
-**/
-enum MonitorMode {
-   PUSH,
-   PULL
-}
 
 /**
  * Resource Job Manager Information
@@ -119,8 +105,7 @@ struct ResourceJobManager {
     2: required ResourceJobManagerType resourceJobManagerType,
     3: optional string pushMonitoringEndpoint,
     4: optional string jobManagerBinPath,
-    5: optional map<JobManagerCommand, string> jobManagerCommands,
-    6: optional MonitorMode monitorMode
+    5: optional map<JobManagerCommand, string> jobManagerCommands
 }
 
 /**
@@ -206,6 +191,21 @@ enum JobSubmissionProtocol {
 }
 
 /**
+* Monitoring modes
+*
+* POLL_JOB_MANAGER:
+* GFac need to pull job status changes.
+*
+* XSEDE_AMQP_SUBSCRIBE:
+* Server will publish job status changes to amqp servert.
+*
+**/
+enum MonitorMode {
+   POLL_JOB_MANAGER,
+   XSEDE_AMQP_SUBSCRIBE
+}
+
+/**
  * Enumeration of data movement supported by Airavata
  *
  * SCP:
@@ -313,7 +313,8 @@ struct SSHJobSubmission {
     2: required SecurityProtocol securityProtocol,
     3: required ResourceJobManager resourceJobManager,
     4: optional string alternativeSSHHostName,
-    5: optional i32 sshPort = 22
+    5: optional i32 sshPort = 22,
+    6: optional MonitorMode monitorMode
 }
 
 struct GlobusJobSubmission {


Mime
View raw message