You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2014/03/18 05:42:06 UTC

[4/7] moving the job-manager to tools

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/Manager.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/Manager.json b/modules/airavata-job-monitor/src/main/resources/schema/Manager.json
deleted file mode 100644
index d1df50a..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/Manager.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Manager.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "ProductName": {
-      "type": "string",
-      "description": "The name of the software product which implements the Manager"
-    },
-    "ProductVersion": {
-      "type": "string",
-      "description": "The version of the software product which implements the Manager"
-    },
-    "ServiceID": {
-      "type": "string",
-      "description": "The ID of the Service this Share participates in"
-    },
-    "ResourceID": {
-      "type": "array",
-      "description": "ID(s) of Resources associated with this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ProductName","ServiceID","ResourceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/MappingPolicy.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/MappingPolicy.json b/modules/airavata-job-monitor/src/main/resources/schema/MappingPolicy.json
deleted file mode 100644
index 268844d..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/MappingPolicy.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/MappingPolicy.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json"}],
-  "properties": {
-    "ShareID": {
-      "type": "string",
-      "description": "The ID of the Share this MappingPolicy is for"
-    }
-  },
-  "required": ["ShareID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/Policy.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/Policy.json b/modules/airavata-job-monitor/src/main/resources/schema/Policy.json
deleted file mode 100644
index f936699..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/Policy.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Policy.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Scheme": {
-      "type": "string",
-      "description": "PolicyScheme_t (open enumeration)"
-    },
-    "Rule": {
-      "type": "array",
-      "description": "Policy rules",
-      "items": {
-        "type": "string"
-      }
-    },
-    "UserDomainID": {
-      "type": "array",
-      "description": "The ID(s) of the UserDomains this Policy applies to",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Scheme","Rule","UserDomainID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/Resource.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/Resource.json b/modules/airavata-job-monitor/src/main/resources/schema/Resource.json
deleted file mode 100644
index 88d08ad..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/Resource.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Resource.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "ManagerID": {
-      "type": "string",
-      "description": "The ID of the Manager for this Resource"
-    },
-    "ShareID": {
-      "type": "array",
-      "description": "The ID(s) of the Shares this Resource is part of",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ActivityID": {
-      "type": "array",
-      "description": "The ID(s) of Activities consuming from this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ManagerID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/Service.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/Service.json b/modules/airavata-job-monitor/src/main/resources/schema/Service.json
deleted file mode 100644
index 4662407..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/Service.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Capability": {
-      "type": "array",
-      "description": "Capability_t (open enumeration)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Type": {
-      "type": "string",
-      "description": "ServiceType_t (open enumeration)"
-    },
-    "QualityLevel": {
-      "type": "string",
-      "description": "QualityLevel_t",
-      "enum": ["development","pre-production","production","testing"]
-    },
-    "StatusInfo": {
-      "type": "array",
-      "description": "URLs of web pages providing additional information",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Complexity": {
-      "type": "string",
-      "description": "A human-readable description of the number of endpoint types, shares, and resources"
-    },
-    "EndpointID": {
-      "type": "array",
-      "description": "The IDs of Endpoints for this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ShareID": {
-      "type": "array",
-      "description": "The IDs of the Shares offered by this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ManagerID": {
-      "type": "array",
-      "description": "The IDs of the Managers of this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ContactID": {
-      "type": "array",
-      "description": "The IDs of Contacts for this Service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "LocationID": {
-      "type": "string",
-      "description": "The ID of the primary Location of this Service"
-    },
-    "ServiceID": {
-      "type": "array",
-      "description": "The IDs of Services related to this Service",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Type","QualityLevel"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/Share.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/Share.json b/modules/airavata-job-monitor/src/main/resources/schema/Share.json
deleted file mode 100644
index 258fc1b..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/Share.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Description": {
-      "type": "string",
-      "description": "A human-readable description of the Share"
-    },
-    "EndpointID": {
-      "type": "array",
-      "description": "The ID(s) of the Endpoints that can be used to access this Share",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ResourceID": {
-      "type": "array",
-      "description": "The ID(s) of the Resources associated with this Share",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ServiceID": {
-      "type": "string",
-      "description": "The ID of the Service this Share participates in"
-    },
-    "ActivityID": {
-      "type": "array",
-      "description": "The ID(s) of Activities consuming from this Share",
-      "items": {
-        "type": "string"
-      }
-    },
-    "MappingPolicyID": {
-      "type": "array",
-      "description": "ID(s) of MappingPolicies associated with this Share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageAccessProtocol.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageAccessProtocol.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageAccessProtocol.json
deleted file mode 100644
index 05a830b..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageAccessProtocol.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageAccessProtocol.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of the protocol - StorageAccessProtocol_t"
-    },
-    "Version": {
-      "type": "string",
-      "description": "The version of the protocol supported"
-    },
-    "MaxStreams": {
-      "type": "integer",
-      "description": "The maximum number of parallel network streams which can be usef for a single transfer"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService this protocol is available for"
-    },
-    "ToComputingServiceID": {
-      "type": "array",
-      "description": "The ID(s) ToComputingService objects that describe connectivity to ComputingServices",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["Type","Version","StorageServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageEndpoint.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageEndpoint.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageEndpoint.json
deleted file mode 100644
index 38b27c4..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageEndpoint.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageEndpoint.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Endpoint.json"}],
-  "properties": {
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageManager.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageManager.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageManager.json
deleted file mode 100644
index f3984f6..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageManager.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageManager.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
-  "properties": {
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageService.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageService.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageService.json
deleted file mode 100644
index a03d111..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageService.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Service.json"}],
-  "properties": {
-    "StorageAccessProtocolID": {
-      "type": "array",
-      "description": "The ID(s) of the StorageAccessProtocols supported by this service",
-      "items": {
-        "type": "string"
-      }
-    },
-    "StorageServiceCapacityID": {
-      "type": "array",
-      "description": "The ID(s) of the StorageServiceCapacities for this Service",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageServiceCapacity.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageServiceCapacity.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageServiceCapacity.json
deleted file mode 100644
index a25c204..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageServiceCapacity.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageServiceCapacity.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of storage capacity - StorageCapacity_t"
-    },
-    "TotalSize": {
-      "type": "integer",
-      "description": "The total amount of storage of this type (GB)"
-    },
-    "FreeSize": {
-      "type": "integer",
-      "description": "The amount of currently available storage of this type (GB)"
-    },
-    "UsedSize": {
-      "type": "integer",
-      "description": "The amount storage of this type in use (GB)"
-    },
-    "ReservedSize": {
-      "type": "integer",
-      "description": "The amount storage of this type which is not in use, but has been reserved for use in use (GB)"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService this capacity describes"
-    }
-  },
-  "required": ["Type","StorageServiceID"]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageShare.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageShare.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageShare.json
deleted file mode 100644
index 9703118..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageShare.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShare.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Share.json"}],
-  "properties": {
-    "ServingState": {
-      "type": "string",
-      "description": "How the Share is currently serving jobs",
-      "enum": ["closed","draining","production","queueing"]
-    },
-    "Path": {
-      "type": "string",
-      "description": "A default namespace where files are logically placed when they are stored in this Share"
-    },
-    "AccessMode": {
-      "type": "array",
-      "description": "The type of access allowed for this share - AccessMode_t (undefined)",
-      "items": {
-        "type": "string"
-      }
-    },
-    "SharingID": {
-      "type": "string",
-      "description": "A local identifier common to the set of StorageShares which use the same underling extents"
-    },
-    "AccessLatency": {
-      "type": "string",
-      "description": "The maximum latency category under normal operating conditions",
-      "enum": ["nearline","offline","online"]
-    },
-    "RetentionPolicy": {
-      "type": "string",
-      "description": "The quality of data retention - RetentionPolicy_t"
-    },
-    "ExpirationMode": {
-      "type": "array",
-      "description": "Supported file lifetime modes",
-      "items": {
-        "type": "string",
-        "enum": ["neverexpire","releasewhenexpired","warnwhenexpired"]
-      }
-    },
-    "DefaultLifeTime": {
-      "type": "integer",
-      "description": "The default lifetime assigned to a new file"
-    },
-    "MaximumLifeTime": {
-      "type": "integer",
-      "description": "The maximum lifetime that can be requested for a file"
-    },
-    "Tag": {
-      "type": "string",
-      "description": "An identifier defined by a UserDomain"
-    },
-    "StorageShareCapacityID": {
-      "type": "array",
-      "description": "ID of the StorageShareCapacities associated with this share",
-      "items": {
-        "type": "string"
-      }
-    }
-  },
-  "required": ["ServingState","SharingID","AccessLatency"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/StorageShareCapacity.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/StorageShareCapacity.json b/modules/airavata-job-monitor/src/main/resources/schema/StorageShareCapacity.json
deleted file mode 100644
index f392c94..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/StorageShareCapacity.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/StorageShareCapacity.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "Type": {
-      "type": "string",
-      "description": "The type of storage capacity - StorageCapacity_t"
-    },
-    "TotalSize": {
-      "type": "integer",
-      "description": "The total amount of storage (GB)"
-    },
-    "FreeSize": {
-      "type": "integer",
-      "description": "The amount of available storage (GB)"
-    },
-    "UsedSize": {
-      "type": "integer",
-      "description": "The amount of used storage (GB)"
-    },
-    "ReservedSize": {
-      "type": "integer",
-      "description": "The amount storage which is not occupied, but has been reserved for use (GB)"
-    },
-    "StorageShareID": {
-      "type": "string",
-      "description": "The ID of the StorageShare related to this capacity"
-    }
-  },
-  "required": ["Type","StorageShareID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/ToComputingService.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/ToComputingService.json b/modules/airavata-job-monitor/src/main/resources/schema/ToComputingService.json
deleted file mode 100644
index 6d81b80..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/ToComputingService.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToComputingService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "NetworkInfo": {
-      "type": "string",
-      "description": "Type of network connections between the Storage and Computing services (NetworkInfo_t)"
-    },
-    "Bandwidth": {
-      "type": "integer",
-      "description": "The normal bandwidth available between the Storage and Computing services (Mb/s)"
-    },
-    "StorageAccessProtocolID": {
-      "type": "array",
-      "description": "IDs of the protocols that can be used to access the StorageService",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ComputingServiceID": {
-      "type": "string",
-      "description": "The ID of the ComputingService"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService"
-    }
-  },
-  "required": ["ComputingServiceID","StorageServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/ToStorageService.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/ToStorageService.json b/modules/airavata-job-monitor/src/main/resources/schema/ToStorageService.json
deleted file mode 100644
index 644f3d1..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/ToStorageService.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/ToStorageService.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Entity.json"}],
-  "properties": {
-    "LocalPath": {
-      "type": "string",
-      "description": "The path within the ComputingService that is used to access the StorageService"
-    },
-    "RemotePath": {
-      "type": "string",
-      "description": "The path in the StorageService which is associated with the LocalPath"
-    },
-    "ComputingServiceID": {
-      "type": "string",
-      "description": "The ID of the ComputingService"
-    },
-    "StorageServiceID": {
-      "type": "string",
-      "description": "The ID of the StorageService"
-    }
-  },
-  "required": ["LocalPath","RemotePath","ComputingServiceID","StorageServiceID"]
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/main/resources/schema/UserDomain.json
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/main/resources/schema/UserDomain.json b/modules/airavata-job-monitor/src/main/resources/schema/UserDomain.json
deleted file mode 100644
index 7acda31..0000000
--- a/modules/airavata-job-monitor/src/main/resources/schema/UserDomain.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
-  "$schema": "http://json-schema.org/draft-04/schema#",
-  "id": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/UserDomain.json",
-  "type": "object",
-  "allOf": [{"$ref": "http://schemas.ogf.org/glue/2013/05/spec_2.0_r1/Domain.json"}],
-  "properties": {
-    "Level": {
-      "type": "integer",
-      "description": "the number of hops to reach the root of the hierarchy of UserDomains"
-    },
-    "UserManagerID": {
-      "type": "array",
-      "description": "ID for the Endpoint of a Service managing users in this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "Member": {
-      "type": "array",
-      "description": "Identifiers for users in this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "PolicyID": {
-      "type": "array",
-      "description": "IDs for Policies associated with this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ChildDomainID": {
-      "type": "array",
-      "description": "IDs of UserDomains aggregated by this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "ParentDomainID": {
-      "type": "string",
-      "description": "The ID of the UserDomain that this UserDomain participates in"
-    },
-    "AccessPolicyID": {
-      "type": "array",
-      "description": "IDs of AccessPolicies associated with this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    },
-    "MappingPolicyID": {
-      "type": "array",
-      "description": "IDs of MappingPolicies associated with this UserDomain",
-      "items": {
-        "type": "string"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java b/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java
deleted file mode 100644
index 4e35434..0000000
--- a/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * 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.job.monitor;
-
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class AMQPMonitorTest {
-    private MonitorManager monitorManager;
-
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String pbsFilePath;
-    private String workingDirectory;
-    private HostDescription hostDescription;
-
-    @Before
-    public void setUp() throws Exception {
-        System.setProperty("myproxy.user", "ogce");
-        System.setProperty("myproxy.password", "");
-        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-        System.setProperty("gsi.working.directory", "/home/ogce");
-        myProxyUserName = System.getProperty("myproxy.user");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-        String pomDirectory = System.getProperty("basedir");
-        certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
-        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-
-        monitorManager = new MonitorManager();
-        AMQPMonitor amqpMonitor = new
-                AMQPMonitor(monitorManager.getMonitorPublisher(),
-                monitorManager.getPullQueue(), monitorManager.getFinishQueue(),"/Users/lahirugunathilake/Downloads/x509up_u503876","xsede_private",
-                Arrays.asList("info1.dyn.teragrid.org,info2.dyn.teragrid.org".split(",")));
-        try {
-            monitorManager.addPushMonitor(amqpMonitor);
-            monitorManager.launchMonitor();
-        } catch (AiravataMonitorException e) {
-            e.printStackTrace();
-        }
-
-        hostDescription = new HostDescription(GsisshHostType.type);
-        hostDescription.getType().setHostAddress("gordon.sdsc.xsede.org");
-        hostDescription.getType().setHostName("gsissh-gordon");
-    }
-
-    @Test
-    public void testAMQPMonitor() throws SSHApiException {
-        /* now have to submit a job to some machine and add that job to the queue */
-        //Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
-
-
-        Cluster pbsCluster = new
-                PBSCluster(serverInfo, authenticationInfo, org.apache.airavata.gsi.ssh.util.CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-
-
-        // Execute command
-        System.out.println("Target PBS file path: " + workingDirectory);
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("60");
-        jobDescriptor.setAcountString("sds128");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setOwner("ogce");
-        inputs.add("Hello World");
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-        System.out.println(jobID);
-        try {
-            monitorManager.addAJobToMonitor(new MonitorID(hostDescription, jobID,null,null, "ogce"));
-        } catch (AiravataMonitorException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        try {
-            Thread.sleep(10000);
-        } catch (InterruptedException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java b/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java
deleted file mode 100644
index 126b8ae..0000000
--- a/modules/airavata-job-monitor/src/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * 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.job.monitor;
-
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public class QstatMonitorTest {
-    private MonitorManager monitorManager;
-
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String pbsFilePath;
-    private String workingDirectory;
-    private HostDescription hostDescription;
-
-    @Before
-    public void setUp() throws Exception {
-        System.setProperty("myproxy.user", "ogce");
-        System.setProperty("myproxy.password", "");
-        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-        System.setProperty("gsi.working.directory", "/home/ogce");
-        myProxyUserName = System.getProperty("myproxy.user");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-        String pomDirectory = System.getProperty("basedir");
-        certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
-        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-
-        monitorManager = new MonitorManager();
-        QstatMonitor qstatMonitor = new
-                QstatMonitor(monitorManager.getPullQueue(), monitorManager.getMonitorPublisher());
-        try {
-            monitorManager.addPullMonitor(qstatMonitor);
-            monitorManager.launchMonitor();
-        } catch (AiravataMonitorException e) {
-            e.printStackTrace();
-        }
-
-        hostDescription = new HostDescription(GsisshHostType.type);
-        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
-        hostDescription.getType().setHostName("gsissh-gordon");
-    }
-
-    @Test
-    public void testQstatMonitor() throws SSHApiException {
-        /* now have to submit a job to some machine and add that job to the queue */
-        //Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
-
-
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-
-
-        // Execute command
-        System.out.println("Target PBS file path: " + workingDirectory);
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("60");
-        jobDescriptor.setAcountString("sds128");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setOwner("ogce");
-        inputs.add("Hello World");
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        for (int i = 0; i < 1; i++) {
-            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-            MonitorID monitorID = new MonitorID(hostDescription, jobID,null,null, "ogce");
-            monitorID.setAuthenticationInfo(authenticationInfo);
-            try {
-                monitorManager.addAJobToMonitor(monitorID);
-            } catch (AiravataMonitorException e) {
-                e.printStackTrace();
-            }
-        }
-        try {
-            Thread.sleep(10000000);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/test/resources/gsissh.properties
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/test/resources/gsissh.properties b/modules/airavata-job-monitor/src/test/resources/gsissh.properties
deleted file mode 100644
index 3fdf76d..0000000
--- a/modules/airavata-job-monitor/src/test/resources/gsissh.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-#
-# 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.
-#
-
-###########################################################################
-# Specifies system level configurations as a key/value pairs.
-###########################################################################
-
-StrictHostKeyChecking=no
-ssh.session.timeout=360000

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/modules/airavata-job-monitor/src/test/resources/monitor.properties
----------------------------------------------------------------------
diff --git a/modules/airavata-job-monitor/src/test/resources/monitor.properties b/modules/airavata-job-monitor/src/test/resources/monitor.properties
deleted file mode 100644
index a4d68cf..0000000
--- a/modules/airavata-job-monitor/src/test/resources/monitor.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
-proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
-connection.name=xsede_private
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/tools/job-monitor/pom.xml b/tools/job-monitor/pom.xml
new file mode 100644
index 0000000..185b068
--- /dev/null
+++ b/tools/job-monitor/pom.xml
@@ -0,0 +1,177 @@
+<?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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata</artifactId>
+        <version>0.12-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-job-monitor</artifactId>
+    <name>Airavata Job Monitor</name>
+    <description>This component handle the Airavata Job monitoring funcationality</description>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.jglobus</groupId>
+            <artifactId>gss</artifactId>
+            <version>${jglobus.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jglobus</groupId>
+            <artifactId>myproxy</artifactId>
+            <version>${jglobus.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.bouncycastle</groupId>
+                    <artifactId>bcprov-jdk16</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!--dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>1.48</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcpkix-jdk15on</artifactId>
+            <version>1.48</version>
+        </dependency-->
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-registry-cpi</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-jpa-registry</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.bouncycastle</groupId>
+                    <artifactId>bcprov-jdk16</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.rabbitmq</groupId>
+            <artifactId>amqp-client</artifactId>
+            <version>3.2.3</version>
+        </dependency>
+        <!-- SSH -->
+        <dependency>
+            <groupId>net.schmizz</groupId>
+            <artifactId>sshj</artifactId>
+            <version>0.8.0</version>
+        </dependency>
+
+
+        <!-- Test -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>6.1.1</version>
+            <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>
+
+
+        <!-- Guava -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>12.0</version>
+        </dependency>
+
+        <!-- gsi-ssh api dependencies -->
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>gsissh</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>0.1.50</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>bcgss</artifactId>
+            <version>146</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xmlbeans</groupId>
+            <artifactId>xmlbeans</artifactId>
+            <version>${xmlbeans.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>false</skip>
+                    <forkMode>always</forkMode>
+                    <failIfNoTests>false</failIfNoTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.jsonschema2pojo</groupId>
+                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
+                <version>0.4.0</version>
+                <configuration>
+                    <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory>
+                    <targetPackage>org.apache.airavata</targetPackage>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/AiravataJobStatusUpdator.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/AiravataJobStatusUpdator.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/AiravataJobStatusUpdator.java
new file mode 100644
index 0000000..601cc27
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/AiravataJobStatusUpdator.java
@@ -0,0 +1,127 @@
+/*
+ *
+ * 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.job.monitor;
+
+import com.google.common.eventbus.Subscribe;
+
+import org.apache.airavata.job.monitor.state.JobStatus;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
+import org.apache.airavata.registry.cpi.CompositeIdentifier;
+import org.apache.airavata.registry.cpi.Registry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Calendar;
+import java.util.concurrent.BlockingQueue;
+
+public class AiravataJobStatusUpdator{
+    private final static Logger logger = LoggerFactory.getLogger(AiravataJobStatusUpdator.class);
+
+    private Registry airavataRegistry;
+
+    private BlockingQueue<MonitorID> jobsToMonitor;
+
+
+    public AiravataJobStatusUpdator(Registry airavataRegistry, BlockingQueue<MonitorID> jobsToMonitor) {
+        this.airavataRegistry = airavataRegistry;
+        this.jobsToMonitor = jobsToMonitor;
+    }
+
+    public Registry getAiravataRegistry() {
+        return airavataRegistry;
+    }
+
+    public void setAiravataRegistry(Registry airavataRegistry) {
+        this.airavataRegistry = airavataRegistry;
+    }
+
+    public BlockingQueue<MonitorID> getJobsToMonitor() {
+        return jobsToMonitor;
+    }
+
+    public void setJobsToMonitor(BlockingQueue<MonitorID> jobsToMonitor) {
+        this.jobsToMonitor = jobsToMonitor;
+    }
+
+    @Subscribe
+    public void updateRegistry(JobStatus jobStatus) {
+        /* Here we need to parse the jobStatus message and update
+                the registry accordingly, for now we are just printing to standard Out
+                 */
+        JobState state = jobStatus.getState();
+        if (state != null) {
+            try {
+                String taskID = jobStatus.getMonitorID().getTaskID();
+                String jobID = jobStatus.getMonitorID().getJobID();
+                updateJobStatus(taskID, jobID, state);
+            } catch (Exception e) {
+                logger.error("Error persisting data" + e.getLocalizedMessage(), e);
+            }
+            switch (state) {
+                case COMPLETE:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is DONE");
+                    jobsToMonitor.remove(jobStatus.getMonitorID());
+                    break;
+                case UNKNOWN:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is UNKNOWN");
+                    jobsToMonitor.remove(jobStatus.getMonitorID());
+                    //todo implement this logic
+                    break;
+                case QUEUED:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is QUEUED");
+                    break;
+                case SUBMITTED:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is SUBMITTED");
+                    break;
+                case ACTIVE:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is ACTIVE");
+                    break;
+                case CANCELED:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is CANCELED");
+                    jobsToMonitor.remove(jobStatus.getMonitorID());
+                    break;
+                case FAILED:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is FAILED");
+                    jobsToMonitor.remove(jobStatus.getMonitorID());
+                    break;
+                case HELD:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is HELD");
+                    break;
+                case SUSPENDED:
+                    logger.info("Job ID:" + jobStatus.getMonitorID().getJobID() + " is SUSPENDED");
+                    jobsToMonitor.remove(jobStatus.getMonitorID());
+                    break;
+            }
+        }
+    }
+    public  void updateJobStatus(String taskId, String jobID, JobState state) throws Exception {
+        JobDetails details = new JobDetails();
+        org.apache.airavata.model.workspace.experiment.JobStatus status = new org.apache.airavata.model.workspace.experiment.JobStatus();
+        status.setJobState(state);
+        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
+        details.setJobStatus(status);
+        details.setJobID(jobID);
+        CompositeIdentifier ids = new CompositeIdentifier(taskId, jobID);
+        airavataRegistry.update(org.apache.airavata.registry.cpi.DataType.JOB_DETAIL, details, ids);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorID.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorID.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorID.java
new file mode 100644
index 0000000..f65241a
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorID.java
@@ -0,0 +1,211 @@
+/*
+ *
+ * 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.job.monitor;
+
+import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo;
+import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
+import org.apache.airavata.job.monitor.state.JobStatus;
+import org.apache.airavata.model.workspace.experiment.JobState;
+import org.omg.PortableInterceptor.ACTIVE;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Timestamp;
+import java.util.Date;
+import java.util.Map;
+import java.util.Properties;
+
+/*
+This is the object which contains the data to identify a particular
+Job to start the monitoring
+*/
+public class MonitorID {
+    private final static Logger logger = LoggerFactory.getLogger(MonitorID.class);
+
+    private String userName;
+
+    private String jobID;
+
+    private Timestamp jobStartedTime;
+
+    private Timestamp lastMonitored;
+
+    private HostDescription host;
+
+
+    private AuthenticationInfo authenticationInfo = null;
+
+    private Map<String, Object> parameters;
+
+    private String experimentID;
+
+    private String taskID;
+
+    private int failedCount = 0;
+
+    private JobState state;
+
+    public MonitorID(HostDescription host, String jobID,String taskID,String experimentID, String userName) {
+        this.host = host;
+        this.jobStartedTime = new Timestamp((new Date()).getTime());
+        this.userName = userName;
+        this.jobID = jobID;
+        this.taskID = taskID;
+        this.experimentID = experimentID;
+    }
+
+    public MonitorID(HostDescription host, String jobID,String taskID,String experimentID, String userName,AuthenticationInfo authenticationInfo) {
+        this.host = host;
+        this.jobStartedTime = new Timestamp((new Date()).getTime());
+        this.authenticationInfo = authenticationInfo;
+        this.userName = userName;
+        // if we give myproxyauthenticationInfo, so we try to use myproxy user as the user
+        if(this.authenticationInfo != null){
+            if(this.authenticationInfo instanceof MyProxyAuthenticationInfo){
+                this.userName = ((MyProxyAuthenticationInfo)this.authenticationInfo).getUserName();
+            }
+        }
+        this.jobID = jobID;
+        this.taskID = taskID;
+        this.experimentID = experimentID;
+    }
+    public HostDescription getHost() {
+        return host;
+    }
+
+    public void setHost(HostDescription host) {
+        this.host = host;
+    }
+
+    public Timestamp getLastMonitored() {
+        return lastMonitored;
+    }
+
+    public void setLastMonitored(Timestamp lastMonitored) {
+        this.lastMonitored = lastMonitored;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getJobID() {
+        return jobID;
+    }
+
+    public void setJobID(String jobID) {
+        this.jobID = jobID;
+    }
+
+    public Timestamp getJobStartedTime() {
+        return jobStartedTime;
+    }
+
+    public void setJobStartedTime(Timestamp jobStartedTime) {
+        this.jobStartedTime = jobStartedTime;
+    }
+
+    public AuthenticationInfo getAuthenticationInfo() {
+        return authenticationInfo;
+    }
+
+    public void setAuthenticationInfo(AuthenticationInfo authenticationInfo) {
+        this.authenticationInfo = authenticationInfo;
+    }
+
+    public void addParameter(String key,Object value) {
+        this.parameters.put(key, value);
+    }
+
+    public Object getParameter(String key) {
+        return this.parameters.get(key);
+    }
+
+    public Map<String, Object> getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(Map<String, Object> parameters) {
+        this.parameters = parameters;
+    }
+
+    public String getExperimentID() {
+        return experimentID;
+    }
+
+    public void setExperimentID(String experimentID) {
+        this.experimentID = experimentID;
+    }
+
+    public String getTaskID() {
+        return taskID;
+    }
+
+    public void setTaskID(String taskID) {
+        this.taskID = taskID;
+    }
+
+    public int getFailedCount() {
+        return failedCount;
+    }
+
+    public void setFailedCount(int failedCount) {
+        this.failedCount = failedCount;
+    }
+
+    public JobState getStatus() {
+        return state;
+    }
+
+    public void setStatus(JobState status) {
+        // this logic is going to be useful for fast finishing jobs
+        // because in some machines job state vanishes quicckly when the job is done
+        // during that case job state comes as unknown.so we handle it here.
+            if (this.state != null && status.equals(JobState.UNKNOWN)) {
+                if (getFailedCount() > 2) {
+                    switch (this.state) {
+                        case ACTIVE:
+                            this.state = JobState.COMPLETE;
+                            break;
+                        case QUEUED:
+                            this.state = JobState.COMPLETE;
+                            break;
+                    }
+                } else {
+                    try {
+                        // when state becomes unknown we sleep for a while
+                        Thread.sleep(10000);
+                    } catch (InterruptedException e) {
+                        e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+                    }
+                    setFailedCount(getFailedCount() + 1);
+                }
+            } else {
+                // normal scenario
+                this.state = status;
+            }
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorManager.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorManager.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorManager.java
new file mode 100644
index 0000000..3515a68
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/MonitorManager.java
@@ -0,0 +1,237 @@
+/*
+ *
+ * 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.job.monitor;
+
+import com.google.common.eventbus.EventBus;
+import org.apache.airavata.common.utils.Constants;
+import org.apache.airavata.job.monitor.core.PullMonitor;
+import org.apache.airavata.job.monitor.core.PushMonitor;
+import org.apache.airavata.job.monitor.event.MonitorPublisher;
+import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor;
+import org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor;
+import org.apache.airavata.job.monitor.impl.push.amqp.UnRegisterThread;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
+import org.apache.airavata.schemas.gfac.GsisshHostType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+/*
+this is the manager class for monitoring system of airavata,
+This simply handle the monitoring flow of the system.
+Keeps available jobs to monitor in a queue and once they are done
+remove them from the queue, this will be done by AiravataJobUpdator.
+ */
+public class MonitorManager {
+    private final static Logger logger = LoggerFactory.getLogger(MonitorManager.class);
+
+    private List<PullMonitor> pullMonitors;    //todo though we have a List we only support one at a time
+
+    private List<PushMonitor> pushMonitors;   //todo we need to support multiple monitors dynamically
+
+    private BlockingQueue<MonitorID> pullQueue;
+
+    private BlockingQueue<MonitorID> pushQueue;
+
+    private BlockingQueue<MonitorID> localJobQueue;
+
+    private BlockingQueue<MonitorID> finishQueue;
+
+    private MonitorPublisher monitorPublisher;
+
+    /**
+     * This will initialize the major monitoring system.
+     */
+    public MonitorManager() {
+        pullMonitors = new ArrayList<PullMonitor>();
+        pushMonitors = new ArrayList<PushMonitor>();
+        pullQueue = new LinkedBlockingQueue<MonitorID>();
+        pushQueue = new LinkedBlockingQueue<MonitorID>();
+        finishQueue = new LinkedBlockingQueue<MonitorID>();
+        monitorPublisher = new MonitorPublisher(new EventBus());
+        registerListener(new AiravataJobStatusUpdator(new RegistryImpl(), finishQueue));
+    }
+
+    /**
+     * This can be use to add an empty AMQPMonitor object to the monitor system
+     * and tihs method will take care of the initialization
+     * todo may be we need to move this to some other class
+     * @param monitor
+     */
+    public void addAMQPMonitor(AMQPMonitor monitor) {
+        monitor.setPublisher(this.getMonitorPublisher());
+        monitor.setFinishQueue(this.getFinishQueue());
+        monitor.setRunningQueue(this.getPushQueue());
+        addPushMonitor(monitor);
+    }
+
+    /**
+     * This can be used to adda a QstatMonitor and it will take care of
+     * the initialization of QstatMonitor
+     * //todo may be we need to move this to some other class
+     * @param qstatMonitor
+     */
+    public void addQstatMonitor(QstatMonitor qstatMonitor) {
+        qstatMonitor.setPublisher(this.getMonitorPublisher());
+        qstatMonitor.setQueue(this.getPullQueue());
+        addPullMonitor(qstatMonitor);
+
+    }
+
+    /**
+     * To deal with the statuses users can write their own listener and implement their own logic
+     *
+     * @param listener Any class can be written and if you want the JobStatus object to be taken from the bus, just
+     *                 have to put @subscribe as an annotation to your method to recieve the JobStatus object from the bus.
+     */
+    public void registerListener(Object listener) {
+        monitorPublisher.registerListener(listener);
+    }
+
+    /**
+     * todo write
+     *
+     * @param monitor
+     */
+    public void addPushMonitor(PushMonitor monitor) {
+        pushMonitors.add(monitor);
+    }
+
+    /**
+     * todo write
+     *
+     * @param monitor
+     */
+    public void addPullMonitor(PullMonitor monitor) {
+        pullMonitors.add(monitor);
+    }
+
+    /**
+     * Adding this method will trigger the thread in launchMonitor and notify it
+     * This is going to be useful during the startup of the launching process
+     *
+     * @param monitorID
+     * @throws AiravataMonitorException
+     */
+    public void addAJobToMonitor(MonitorID monitorID) throws AiravataMonitorException {
+        if (monitorID.getHost().getType() instanceof GsisshHostType) {
+            GsisshHostType host = (GsisshHostType) monitorID.getHost().getType();
+            if ("".equals(host.getMonitorMode()) || host.getMonitorMode() == null
+                    || Constants.PULL.equals(host.getMonitorMode())) {
+                pullQueue.add(monitorID);
+            } else if (Constants.PUSH.equals(host.getMonitorMode())) {
+                pushQueue.add(monitorID);
+            }
+        } else {
+            logger.error("We only support Gsissh host types currently");
+        }
+    }
+
+    /**
+     * This method should be invoked before adding any elements to monitorQueue
+     * In this method we assume that we give higher preference to Push
+     * Monitorig mechanism if there's any configured, otherwise Pull
+     * monitoring will be launched.
+     * Ex: If there's a reasource which doesn't support Push, we have
+     * to live with Pull MOnitoring.
+     *
+     * @throws AiravataMonitorException
+     */
+    public void launchMonitor() throws AiravataMonitorException {
+        //no push monitor is configured so we launch pull monitor
+        int index = 0;
+        for (PullMonitor monitor : pullMonitors) {
+            (new Thread(monitor)).start();
+        }
+
+        for (PushMonitor monitor : pushMonitors) {
+            (new Thread(monitor)).start();
+            if (monitor instanceof AMQPMonitor) {
+                UnRegisterThread unRegisterThread = new
+                        UnRegisterThread(((AMQPMonitor) monitor).getFinishQueue(), ((AMQPMonitor) monitor).getAvailableChannels());
+                unRegisterThread.start();
+            }
+        }
+    }
+
+    /* getter setters for the private variables */
+
+    public List<PullMonitor> getPullMonitors() {
+        return pullMonitors;
+    }
+
+    public void setPullMonitors(List<PullMonitor> pullMonitors) {
+        this.pullMonitors = pullMonitors;
+    }
+
+    public List<PushMonitor> getPushMonitors() {
+        return pushMonitors;
+    }
+
+    public void setPushMonitors(List<PushMonitor> pushMonitors) {
+        this.pushMonitors = pushMonitors;
+    }
+
+    public BlockingQueue<MonitorID> getPullQueue() {
+        return pullQueue;
+    }
+
+    public void setPullQueue(BlockingQueue<MonitorID> pullQueue) {
+        this.pullQueue = pullQueue;
+    }
+
+    public MonitorPublisher getMonitorPublisher() {
+        return monitorPublisher;
+    }
+
+    public void setMonitorPublisher(MonitorPublisher monitorPublisher) {
+        this.monitorPublisher = monitorPublisher;
+    }
+
+    public BlockingQueue<MonitorID> getFinishQueue() {
+        return finishQueue;
+    }
+
+    public void setFinishQueue(BlockingQueue<MonitorID> finishQueue) {
+        this.finishQueue = finishQueue;
+    }
+
+    public BlockingQueue<MonitorID> getPushQueue() {
+        return pushQueue;
+    }
+
+    public void setPushQueue(BlockingQueue<MonitorID> pushQueue) {
+        this.pushQueue = pushQueue;
+    }
+
+    public BlockingQueue<MonitorID> getLocalJobQueue() {
+        return localJobQueue;
+    }
+
+    public void setLocalJobQueue(BlockingQueue<MonitorID> localJobQueue) {
+        this.localJobQueue = localJobQueue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/AiravataAbstractMonitor.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/AiravataAbstractMonitor.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/AiravataAbstractMonitor.java
new file mode 100644
index 0000000..2e85b32
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/AiravataAbstractMonitor.java
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.job.monitor.core;
+
+import org.apache.airavata.job.monitor.event.MonitorPublisher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This is the abstract Monitor which needs to be used by
+ * any Monitoring implementation which expect to consume
+ * to store the status to registry. Because they have to
+ * use the MonitorPublisher to publish the monitoring statuses
+ * to the Event Bus. All the Monitor statuses publish to the eventbus
+ * will be saved to the Registry.
+ */
+public abstract class AiravataAbstractMonitor implements Monitor {
+    private final static Logger logger = LoggerFactory.getLogger(AiravataAbstractMonitor.class);
+    MonitorPublisher publisher;
+
+    public MonitorPublisher getPublisher() {
+        return publisher;
+    }
+
+    public void setPublisher(MonitorPublisher publisher) {
+        this.publisher = publisher;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/MessageParser.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/MessageParser.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/MessageParser.java
new file mode 100644
index 0000000..c70e372
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/MessageParser.java
@@ -0,0 +1,45 @@
+/*
+ *
+ * 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.job.monitor.core;
+
+import org.apache.airavata.job.monitor.MonitorID;
+import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
+import org.apache.airavata.job.monitor.state.JobStatus;
+
+/**
+ * This is an interface to implement messageparser, it could be
+ * pull based or push based still monitor has to parse the content of
+ * the message it gets from remote monitoring system and finalize
+ * them to internal job state, Ex: JSON parser for AMQP and Qstat reader
+ * for pull based monitor.
+ */
+public interface MessageParser {
+    /**
+     * This method is to implement how to parse the incoming message
+     * and implement a logic to finalize the status of the job,
+     * we have to makesure the correct message is given to the messageparser
+     * parse method, it will not do any filtering
+     * @param message content of the message
+     * @param monitorID monitorID object
+     * @return
+     */
+    JobStatus parseMessage(String message,MonitorID monitorID)throws AiravataMonitorException;
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/Monitor.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/Monitor.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/Monitor.java
new file mode 100644
index 0000000..9627bbc
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/Monitor.java
@@ -0,0 +1,30 @@
+/*
+ *
+ * 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.job.monitor.core;
+
+
+/**
+ * This is the primary interface for Monitors,
+ * This can be used to implement different methods of monitoring
+ */
+public interface Monitor extends Runnable {
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PullMonitor.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PullMonitor.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PullMonitor.java
new file mode 100644
index 0000000..4b904b1
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PullMonitor.java
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.job.monitor.core;
+
+import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
+
+/**
+ * PullMonitors can implement this interface
+ * Since the pull and push based monitoring required different
+ * operations, PullMonitor will be useful.
+ * This will allow users to program Pull monitors separately
+ */
+public abstract class PullMonitor extends AiravataAbstractMonitor{
+
+    private int pollingFrequence;
+    /**
+     * This method will can invoke when PullMonitor needs to start
+     * and it has to invoke in the frequency specified below,
+     * @return if the start process is successful return true else false
+     */
+    public abstract boolean startPulling() throws AiravataMonitorException;
+
+    /**
+     * This is the method to stop the polling process
+     * @return if the stopping process is successful return true else false
+     */
+    public abstract boolean stopPulling()throws AiravataMonitorException;
+
+    /**
+     * this method can be used to set the polling frequencey or otherwise
+     * can implement a polling mechanism, and implement how to do
+     * @param frequence
+     */
+    public void setPollingFrequence(int frequence){
+        this.pollingFrequence = frequence;
+    }
+
+    /**
+     * this method can be used to get the polling frequencey or otherwise
+     * can implement a polling mechanism, and implement how to do
+     * @return
+     */
+    public int getPollingFrequence(){
+        return this.pollingFrequence;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PushMonitor.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PushMonitor.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PushMonitor.java
new file mode 100644
index 0000000..e3ecccd
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/core/PushMonitor.java
@@ -0,0 +1,60 @@
+/*
+ *
+ * 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.job.monitor.core;
+
+import org.apache.airavata.job.monitor.MonitorID;
+import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
+
+/**
+ * PushMonitors can implement this interface
+ * Since the pull and push based monitoring required different
+ * operations, PullMonitor will be useful.
+ * This interface will allow users to program Push monitors separately
+ */
+public abstract class PushMonitor extends AiravataAbstractMonitor {
+    /**
+     * This method can be invoked to register a listener with the
+     * remote monitoring system, ideally inside this method users will be
+     * writing some client listener code for the remote monitoring system,
+     * this will be a simple wrapper around any client for the remote Monitor.
+     * @param monitorID
+     * @return
+     */
+    public abstract boolean registerListener(MonitorID monitorID)throws AiravataMonitorException;
+
+    /**
+     * This method can be invoked to unregister a listener with the
+     * remote monitoring system, ideally inside this method users will be
+     * writing some client listener code for the remote monitoring system,
+     * this will be a simple wrapper around any client for the remote Monitor.
+     * @param monitorID
+     * @return
+     */
+    public abstract boolean unRegisterListener(MonitorID monitorID)throws AiravataMonitorException;
+
+    /**
+     * This can be used to stop the registration thread
+     * @return
+     * @throws AiravataMonitorException
+     */
+    public abstract boolean stopRegister()throws AiravataMonitorException;
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/event/MonitorPublisher.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/event/MonitorPublisher.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/event/MonitorPublisher.java
new file mode 100644
index 0000000..95b64ab
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/event/MonitorPublisher.java
@@ -0,0 +1,44 @@
+/*
+ *
+ * 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.job.monitor.event;
+
+import com.google.common.eventbus.EventBus;
+import org.apache.airavata.job.monitor.MonitorID;
+import org.apache.airavata.job.monitor.state.JobStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MonitorPublisher {
+    private final static Logger logger = LoggerFactory.getLogger(MonitorPublisher.class);
+    private EventBus eventBus;
+
+    public MonitorPublisher(EventBus eventBus) {
+        this.eventBus = eventBus;
+    }
+
+    public void registerListener(Object listener) {
+        eventBus.register(listener);
+    }
+
+    public void publish(JobStatus jobState) {
+        eventBus.post(jobState);
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c2d006e6/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/exception/AiravataMonitorException.java
----------------------------------------------------------------------
diff --git a/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/exception/AiravataMonitorException.java b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/exception/AiravataMonitorException.java
new file mode 100644
index 0000000..5a13be2
--- /dev/null
+++ b/tools/job-monitor/src/main/java/org/apache/airavata/job/monitor/exception/AiravataMonitorException.java
@@ -0,0 +1,37 @@
+/*
+ *
+ * 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.job.monitor.exception;
+
+public class AiravataMonitorException extends Exception {
+    private static final long serialVersionUID = -2849422320139467602L;
+
+    public AiravataMonitorException(Throwable e) {
+        super(e);
+    }
+
+    public AiravataMonitorException(String message) {
+        super(message, null);
+    }
+
+    public AiravataMonitorException(String message, Throwable e) {
+        super(message, e);
+    }
+}