airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [11/15] airavata git commit: merging with master
Date Mon, 23 Mar 2015 19:38:38 GMT
merging with master


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

Branch: refs/heads/master
Commit: 48be39fea6f1df43d0097364a937428198fcc9af
Parents: 93ed077 73f371d
Author: Lahiru Gunathilake <glahiru@gmail.com>
Authored: Thu Mar 19 11:02:15 2015 -0400
Committer: Lahiru Gunathilake <glahiru@gmail.com>
Committed: Thu Mar 19 11:02:15 2015 -0400

----------------------------------------------------------------------
 .../airavata/api/server/AiravataAPIServer.java  |    38 +-
 .../server/handler/AiravataServerHandler.java   |   412 +-
 .../api/server/util/DataModelUtils.java         |     8 +-
 .../java/org/apache/airavata/api/Airavata.java  | 28098 +++++++++++++----
 .../airavata/api/airavataAPIConstants.java      |     2 +-
 .../main/resources/lib/airavata/Airavata.cpp    |  8232 +++--
 .../src/main/resources/lib/airavata/Airavata.h  |  2388 +-
 .../lib/airavata/Airavata_server.skeleton.cpp   |    95 +-
 .../lib/airavata/airavataAPI_constants.cpp      |     2 +-
 .../lib/airavata/computeResourceModel_types.cpp |    12 +-
 .../lib/airavata/computeResourceModel_types.h   |     5 +-
 .../lib/airavata/experimentModel_types.cpp      |    62 +-
 .../lib/airavata/experimentModel_types.h        |    61 +-
 .../gatewayResourceProfileModel_constants.cpp   |     2 -
 .../gatewayResourceProfileModel_constants.h     |     1 -
 .../gatewayResourceProfileModel_types.cpp       |    72 +-
 .../gatewayResourceProfileModel_types.h         |    45 +-
 .../lib/airavata/workspaceModel_types.cpp       |    51 +-
 .../lib/airavata/workspaceModel_types.h         |    45 +-
 .../resources/lib/Airavata/API/Airavata.php     |  7240 +++--
 .../main/resources/lib/Airavata/API/Types.php   |     2 +-
 .../Model/AppCatalog/ComputeResource/Types.php  |    10 +-
 .../Model/AppCatalog/GatewayProfile/Types.php   |    92 +-
 .../Model/Workspace/Experiment/Types.php        |    60 +
 .../lib/Airavata/Model/Workspace/Types.php      |    58 +-
 .../client/samples/CreateLaunchExperiment.java  |   822 +-
 .../samples/CreateLaunchExperimentUS3.java      |    20 +-
 .../client/samples/RegisterSampleData.java      |    37 +-
 .../samples/TestCreateLaunchExperiment.java     |    10 +-
 .../tools/RegisterOGCEUS3Application.java       |    10 +-
 .../tools/RegisterSampleApplications.java       |   335 +-
 .../client/tools/RegisterUS3Application.java    |    14 +-
 .../computeresource/AuthenticationMode.java     |    70 +
 .../computeresource/ResourceJobManagerType.java |    42 +-
 .../computeresource/UnicoreJobSubmission.java   |     2 +
 .../ComputeResourcePreference.java              |   168 +-
 .../gatewayprofile/GatewayResourceProfile.java  |   226 +-
 .../airavata/model/workspace/Gateway.java       |   334 +-
 .../ComputationalResourceScheduling.java        |   109 +-
 .../experiment/UserConfigurationData.java       |   205 +-
 .../airavataAPI.thrift                          |   169 +-
 .../computeResourceModel.thrift                 |    23 +-
 .../experimentModel.thrift                      |    11 +-
 .../gatewayResourceProfileModel.thrift          |    28 +-
 .../workspaceModel.thrift                       |     6 +-
 .../appcatalog/cpi/ApplicationDeployment.java   |     4 +-
 .../appcatalog/cpi/ApplicationInterface.java    |     8 +-
 .../appcatalog/cpi/WorkflowCatalog.java         |     4 +-
 .../data/impl/ApplicationDeploymentImpl.java    |     6 +-
 .../data/impl/ApplicationInterfaceImpl.java     |    12 +-
 .../data/impl/GwyResourceProfileImpl.java       |    30 +-
 .../catalog/data/impl/WorkflowCatalogImpl.java  |     6 +-
 .../data/model/ApplicationDeployment.java       |    10 +
 .../data/model/ApplicationInterface.java        |    10 +
 .../catalog/data/model/ApplicationModule.java   |    10 +
 .../data/model/ComputeResourcePreference.java   |    10 +
 .../catalog/data/model/GatewayProfile.java      |    19 -
 .../data/model/UnicoreJobSubmission.java        |     5 +-
 .../catalog/data/model/Workflow.java            |    10 +
 .../data/resources/AbstractResource.java        |     6 +-
 .../data/resources/AppDeploymentResource.java   |    12 +
 .../data/resources/AppInterfaceResource.java    |    12 +
 .../data/resources/AppModuleResource.java       |    12 +
 .../ComputeHostPreferenceResource.java          |    11 +
 .../data/resources/GatewayProfileResource.java  |    30 +-
 .../resources/UnicoreJobSubmissionResource.java |    16 +-
 .../data/resources/WorkflowResource.java        |    12 +
 .../catalog/data/util/AppCatalogJPAUtils.java   |     7 +-
 .../data/util/AppCatalogThriftConversion.java   |     4 +-
 .../src/main/resources/appcatalog-derby.sql     |   211 +-
 .../src/main/resources/appcatalog-mysql.sql     |   209 +-
 .../app/catalog/test/AppDeploymentTest.java     |    11 +-
 .../app/catalog/test/AppInterfaceTest.java      |    12 +-
 .../app/catalog/test/GatewayProfileTest.java    |     5 +-
 .../src/test/resources/appcatalog-derby.sql     |   211 +-
 .../apache/airavata/common/utils/Constants.java |     4 +-
 .../common/utils/DatabaseTestCases.java         |     2 +-
 .../main/resources/airavata-client.properties   |     2 +-
 .../server/src/main/resources/LSFTemplate.xslt  |    92 +
 .../server/src/main/resources/PBSTemplate.xslt  |    22 +-
 .../server/src/main/resources/SGETemplate.xslt  |    18 +-
 .../src/main/resources/SLURMTemplate.xslt       |    22 +-
 .../main/resources/airavata-server.properties   |     6 +-
 .../credential-store-webapp/pom.xml             |   158 -
 .../basic/BasicAccessAuthenticator.java         |   226 -
 .../credentialstore/local/LocalUserStore.java   |   339 -
 .../session/HttpAuthenticatorFilter.java        |   191 -
 .../session/ServletRequestHelper.java           |   129 -
 .../main/resources/airavata-server.properties   |   237 -
 .../main/resources/credential-store/client.xml  |    36 -
 .../credential-store/oauth-privkey.pk8          |    28 -
 .../resources/credential-store/oauth-pubkey.pem |     9 -
 .../src/main/webapp/WEB-INF/web.xml             |   130 -
 .../src/main/webapp/acs/index.jsp               |    44 -
 .../src/main/webapp/credential-store/error.jsp  |    53 -
 .../credential-store/password-credentials.jsp   |    33 -
 .../webapp/credential-store/show-redirect.jsp   |    44 -
 .../main/webapp/credential-store/success.jsp    |    25 -
 .../src/main/webapp/gateway/acs.jsp             |    62 -
 .../src/main/webapp/gateway/callback.jsp        |    78 -
 .../src/main/webapp/gateway/list_users.jsp      |    78 -
 .../src/main/webapp/gateway/logout.jsp          |    35 -
 .../src/main/webapp/gateway/user.jsp            |   102 -
 .../src/main/webapp/images/airavata-logo-2.png  |   Bin 4314 -> 0 bytes
 .../src/main/webapp/index.jsp                   |    26 -
 .../src/main/webapp/user-store/add.jsp          |   142 -
 .../src/main/webapp/user-store/index.jsp        |   138 -
 .../src/main/webapp/user-store/password.jsp     |   157 -
 .../credential-store/pom.xml                    |   154 -
 .../scripts/credential-store-h2.sql             |    42 -
 .../scripts/credential-store-mysql.sql          |    42 -
 .../credential/store/client/TestSSLClient.java  |   140 -
 .../store/cpi/CredentialStoreService.java       |  6888 ----
 .../store/cpi/cs_cpi_serviceConstants.java      |    55 -
 .../credential/store/credential/AuditInfo.java  |    53 -
 .../store/credential/CommunityUser.java         |    71 -
 .../credential/store/credential/Credential.java |    62 -
 .../impl/certificate/CertificateAuditInfo.java  |   101 -
 .../impl/certificate/CertificateCredential.java |   102 -
 .../impl/password/PasswordCredential.java       |    53 -
 .../credential/impl/ssh/SSHCredential.java      |    88 -
 .../impl/ssh/SSHCredentialGenerator.java        |   103 -
 .../store/datamodel/CertificateCredential.java  |  1104 -
 .../store/datamodel/CommunityUser.java          |   589 -
 .../store/datamodel/PasswordCredential.java     |   698 -
 .../store/datamodel/SSHCredential.java          |   998 -
 .../store/datamodel/csDataModelConstants.java   |    55 -
 .../exception/CredentialStoreException.java     |   397 -
 .../store/notifier/CredentialStoreNotifier.java |    42 -
 .../store/notifier/NotificationMessage.java     |    46 -
 .../store/notifier/NotifierBootstrap.java       |   144 -
 .../notifier/impl/EmailNotificationMessage.java |    58 -
 .../store/notifier/impl/EmailNotifier.java      |    71 -
 .../impl/EmailNotifierConfiguration.java        |    84 -
 .../store/server/CredentialStoreServer.java     |   158 -
 .../server/CredentialStoreServerHandler.java    |   201 -
 .../store/servlet/CredentialBootstrapper.java   |    49 -
 .../servlet/CredentialStoreCallbackServlet.java |   272 -
 .../servlet/CredentialStoreStartServlet.java    |   183 -
 .../store/store/CredentialReader.java           |   112 -
 .../store/store/CredentialReaderFactory.java    |    54 -
 .../store/store/CredentialStoreException.java   |    40 -
 .../store/store/CredentialWriter.java           |    39 -
 .../store/impl/CertificateCredentialWriter.java |   121 -
 .../store/store/impl/CredentialReaderImpl.java  |   162 -
 .../store/store/impl/SSHCredentialWriter.java   |    87 -
 .../store/store/impl/db/CommunityUserDAO.java   |   257 -
 .../store/store/impl/db/CredentialsDAO.java     |   458 -
 .../store/store/impl/db/ParentDAO.java          |    37 -
 .../store/util/ConfigurationReader.java         |   121 -
 .../store/util/CredentialStoreConstants.java    |    37 -
 .../credential/store/util/PrivateKeyStore.java  |    70 -
 .../credential/store/util/TokenGenerator.java   |    57 -
 .../airavata/credential/store/util/Utility.java |   110 -
 .../store/notifier/impl/EmailNotifierTest.java  |    56 -
 .../store/impl/db/CommunityUserDAOTest.java     |   207 -
 .../store/store/impl/db/CredentialsDAOTest.java |   421 -
 .../store/util/ConfigurationReaderTest.java     |    58 -
 .../store/util/TokenGeneratorTest.java          |    42 -
 .../test/resources/credential-store/client.xml  |    35 -
 .../src/test/resources/keystore.jks             |   Bin 2230 -> 0 bytes
 .../src/test/resources/mykeystore.jks           |   Bin 498 -> 0 bytes
 .../credentialStoreErrors.thrift                |    32 -
 .../cs-thrift-description/cs.cpi.service.thrift |    50 -
 .../cs-thrift-description/csDataModel.thrift    |    61 -
 .../cs-thrift-description/generate-cs-stubs.sh  |   134 -
 modules/credential-store-service/pom.xml        |    42 -
 .../credential-store-service/pom.xml            |   166 +
 .../scripts/credential-store-h2.sql             |    42 +
 .../scripts/credential-store-mysql.sql          |    42 +
 .../credential/store/credential/AuditInfo.java  |    53 +
 .../store/credential/CommunityUser.java         |    71 +
 .../credential/store/credential/Credential.java |    62 +
 .../impl/certificate/CertificateAuditInfo.java  |   101 +
 .../impl/certificate/CertificateCredential.java |   102 +
 .../impl/password/PasswordCredential.java       |    53 +
 .../credential/impl/ssh/SSHCredential.java      |    88 +
 .../impl/ssh/SSHCredentialGenerator.java        |   103 +
 .../store/notifier/CredentialStoreNotifier.java |    42 +
 .../store/notifier/NotificationMessage.java     |    46 +
 .../store/notifier/NotifierBootstrap.java       |   144 +
 .../notifier/impl/EmailNotificationMessage.java |    58 +
 .../store/notifier/impl/EmailNotifier.java      |    71 +
 .../impl/EmailNotifierConfiguration.java        |    84 +
 .../store/server/CredentialStoreServer.java     |   158 +
 .../server/CredentialStoreServerHandler.java    |   202 +
 .../store/servlet/CredentialBootstrapper.java   |    49 +
 .../servlet/CredentialStoreCallbackServlet.java |   272 +
 .../servlet/CredentialStoreStartServlet.java    |   183 +
 .../store/store/CredentialReader.java           |   112 +
 .../store/store/CredentialReaderFactory.java    |    54 +
 .../store/store/CredentialStoreException.java   |    40 +
 .../store/store/CredentialWriter.java           |    39 +
 .../store/impl/CertificateCredentialWriter.java |   121 +
 .../store/store/impl/CredentialReaderImpl.java  |   162 +
 .../store/store/impl/SSHCredentialWriter.java   |    87 +
 .../store/store/impl/db/CommunityUserDAO.java   |   257 +
 .../store/store/impl/db/CredentialsDAO.java     |   458 +
 .../store/store/impl/db/ParentDAO.java          |    37 +
 .../store/util/ConfigurationReader.java         |   121 +
 .../store/util/CredentialStoreConstants.java    |    37 +
 .../credential/store/util/PrivateKeyStore.java  |    70 +
 .../credential/store/util/TokenGenerator.java   |    57 +
 .../airavata/credential/store/util/Utility.java |   110 +
 .../store/notifier/impl/EmailNotifierTest.java  |    56 +
 .../store/impl/db/CommunityUserDAOTest.java     |   207 +
 .../store/store/impl/db/CredentialsDAOTest.java |   421 +
 .../store/store/impl/db/SSHCredentialTest.java  |    92 +
 .../store/util/ConfigurationReaderTest.java     |    58 +
 .../store/util/TokenGeneratorTest.java          |    42 +
 .../test/resources/airavata-server.properties   |   254 +
 .../test/resources/credential-store/client.xml  |    35 +
 .../src/test/resources/keystore.jks             |   Bin 0 -> 2230 bytes
 .../src/test/resources/mykeystore.jks           |   Bin 0 -> 498 bytes
 .../credential-store-stubs/pom.xml              |    50 +
 .../credential/store/client/TestSSLClient.java  |   140 +
 .../store/cpi/CredentialStoreService.java       |  6888 ++++
 .../store/cpi/credentialStoreCPIConstants.java  |    55 +
 .../store/datamodel/CertificateCredential.java  |  1104 +
 .../store/datamodel/CommunityUser.java          |   589 +
 .../store/datamodel/PasswordCredential.java     |   698 +
 .../store/datamodel/SSHCredential.java          |   998 +
 .../credentialStoreDataModelConstants.java      |    55 +
 .../exception/CredentialStoreException.java     |   397 +
 .../credential-store-webapp/pom.xml             |   158 +
 .../basic/BasicAccessAuthenticator.java         |   226 +
 .../credentialstore/local/LocalUserStore.java   |   339 +
 .../session/HttpAuthenticatorFilter.java        |   191 +
 .../session/ServletRequestHelper.java           |   129 +
 .../main/resources/airavata-server.properties   |   237 +
 .../main/resources/credential-store/client.xml  |    36 +
 .../credential-store/oauth-privkey.pk8          |    28 +
 .../resources/credential-store/oauth-pubkey.pem |     9 +
 .../src/main/webapp/WEB-INF/web.xml             |   130 +
 .../src/main/webapp/acs/index.jsp               |    44 +
 .../src/main/webapp/credential-store/error.jsp  |    53 +
 .../credential-store/password-credentials.jsp   |    33 +
 .../webapp/credential-store/show-redirect.jsp   |    44 +
 .../main/webapp/credential-store/success.jsp    |    25 +
 .../src/main/webapp/gateway/acs.jsp             |    62 +
 .../src/main/webapp/gateway/callback.jsp        |    78 +
 .../src/main/webapp/gateway/list_users.jsp      |    78 +
 .../src/main/webapp/gateway/logout.jsp          |    35 +
 .../src/main/webapp/gateway/user.jsp            |   102 +
 .../src/main/webapp/images/airavata-logo-2.png  |   Bin 0 -> 4314 bytes
 .../src/main/webapp/index.jsp                   |    26 +
 .../src/main/webapp/user-store/add.jsp          |   142 +
 .../src/main/webapp/user-store/index.jsp        |   138 +
 .../src/main/webapp/user-store/password.jsp     |   157 +
 .../credentialStoreCPI.thrift                   |    61 +
 .../credentialStoreDataModel.thrift             |    61 +
 .../credentialStoreErrors.thrift                |    32 +
 .../cs-thrift-descriptions/generate-cs-stubs.sh |   134 +
 modules/credential-store/pom.xml                |    43 +
 modules/distribution/server/pom.xml             |  1211 +-
 .../server/src/main/assembly/bin-assembly.xml   |     1 +
 .../server/src/main/resources/bin/data.sql      |   141 -
 .../airavata/gfac/server/GfacServerHandler.java |    54 +-
 .../airavata/gfac/client/util/Initialize.java   |     4 +-
 modules/gfac/gfac-bes/pom.xml                   |     4 +-
 .../gfac/bes/provider/impl/BESProvider.java     |    10 +-
 .../org/apache/airavata/gfac/RequestData.java   |     2 +
 .../gfac/core/context/JobExecutionContext.java  |     9 +
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  |    26 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |     2 +-
 .../gfac/core/utils/OutHandlerWorker.java       |    11 +-
 .../gfac/gsissh/util/GFACGSISSHUtils.java       |    10 +-
 .../monitor/impl/pull/qstat/HPCPullMonitor.java |    42 +-
 .../impl/pull/qstat/ResourceConnection.java     |    16 +-
 .../airavata/gfac/monitor/util/CommonUtils.java |     1 +
 .../gfac/ssh/provider/impl/SSHProvider.java     |     1 +
 .../gfac/ssh/security/TokenizedSSHAuthInfo.java |     5 +-
 .../airavata/gfac/ssh/util/GFACSSHUtils.java    |    53 +-
 .../airavata/gfac/ssh/util/HandleOutputs.java   |     5 +-
 .../apache/airavata/integration/BaseCaseIT.java |     4 +-
 .../airavata/integration/DataRetrievalIT.java   |     8 +-
 .../airavata/integration/SimpleEchoIT.java      |     4 +-
 .../SingleAppIntegrationTestBase.java           |     6 +-
 .../WorkflowIntegrationTestBase.java            |     2 +-
 .../integration/tools/DocumentCreatorNew.java   |    75 +-
 modules/messaging/client/pom.xml                |     2 +-
 .../messaging/client/RabbitMQListener.java      |   228 +
 .../messaging/client/RabbitMQListner.java       |   230 -
 .../airavata/messaging/client/TestReader.java   |    50 +
 .../orchestrator/util/DataModelUtils.java       |    10 +-
 .../orchestrator/client/util/Initialize.java    |     4 +-
 .../airavata/orchestrator/cpi/Orchestrator.java |     2 +-
 .../orchestrator/core/util/Initialize.java      |     4 +-
 .../persistance/registry/jpa/ResourceType.java  |     2 -
 .../persistance/registry/jpa/ResourceUtils.java |    69 +-
 .../registry/jpa/impl/ExperimentRegistry.java   |    16 +-
 .../registry/jpa/impl/GatewayRegistry.java      |    76 +
 .../registry/jpa/impl/LoggingRegistryImpl.java  |    35 +-
 .../registry/jpa/impl/ProjectRegistry.java      |    16 +-
 .../registry/jpa/impl/RegistryFactory.java      |    17 +
 .../registry/jpa/impl/RegistryImpl.java         |    28 +-
 .../Computational_Resource_Scheduling.java      |    10 +
 .../registry/jpa/model/Experiment.java          |    14 +-
 .../jpa/model/ExperimentConfigData.java         |    20 +
 .../persistance/registry/jpa/model/Gateway.java |    32 +-
 .../registry/jpa/model/Gateway_Worker.java      |    14 +-
 .../registry/jpa/model/Gateway_Worker_PK.java   |    14 +-
 .../persistance/registry/jpa/model/Project.java |    13 +-
 .../registry/jpa/model/Published_Workflow.java  |   124 -
 .../jpa/model/Published_Workflow_PK.java        |    64 -
 .../registry/jpa/model/User_Workflow.java       |   122 -
 .../registry/jpa/model/User_Workflow_PK.java    |    74 -
 .../jpa/resources/AbstractResource.java         |    33 +-
 .../ComputationSchedulingResource.java          |    10 +
 .../jpa/resources/ConfigDataResource.java       |    22 +
 .../jpa/resources/ExperimentResource.java       |     6 +-
 .../registry/jpa/resources/GatewayResource.java |   159 +-
 .../registry/jpa/resources/ProjectResource.java |     4 +-
 .../jpa/resources/PublishWorkflowResource.java  |   282 -
 .../jpa/resources/UserWorkflowResource.java     |   174 -
 .../registry/jpa/resources/Utils.java           |    72 +-
 .../registry/jpa/resources/WorkerResource.java  |   100 +-
 .../jpa/utils/ThriftDataModelConversion.java    |    22 +
 .../src/main/resources/META-INF/persistence.xml |     2 -
 .../src/main/resources/registry-derby.sql       |    58 +-
 .../src/main/resources/registry-mysql.sql       |    56 +-
 .../registry/jpa/GatewayResourceTest.java       |    26 +-
 .../jpa/PublishWorkflowResourceTest.java        |    62 -
 .../registry/jpa/UserWorkflowResourceTest.java  |    66 -
 .../registry/jpa/util/Initialize.java           |     4 +-
 .../src/test/resources/registry-derby.sql       |    58 +-
 .../airavata/registry/cpi/ParentDataType.java   |     3 +-
 .../apache/airavata/registry/cpi/Registry.java  |     2 +-
 .../registry/cpi/RegistryModelType.java         |     1 +
 .../airavata/registry/cpi/utils/Constants.java  |     3 +-
 .../src/test/resources/jdbc-authenticator.xml   |     2 +-
 .../test/resources/session-authenticator.xml    |     2 +-
 modules/test-suite/pom.xml                      |   116 -
 .../tests/LeadCallbackHandlerTest.java          |   173 -
 .../tests/LeadNotificationManagerTest.java      |    49 -
 .../tests/MultipleSubscriptionTest.java         |   105 -
 .../tests/RenewSubscriptionTest.java            |   155 -
 .../tests/ThreadMessagePassingCallback.java     |    27 -
 .../tests/impl/publish/Test.java                |    40 -
 .../tests/impl/publish/TestWSMPublisher.java    |   119 -
 .../tests/messagebox/MessagePullerTest.java     |   140 -
 .../MultipleSubscriptionForMessageBoxTest.java  |   118 -
 .../tests/messagebox/RenewSubscriptionTest.java |   109 -
 .../tests/messagebox/SubscriberThread.java      |    96 -
 .../restart/MessageBoxClientRestartTest.java    |   131 -
 .../restart/MessageBoxCreateThread.java         |    83 -
 .../tests/samples/workflow/SimpleTest.java      |   202 -
 .../workflow/SimpleWorkflowExecution.java       |   473 -
 .../workflow/WorkflowNotificationListener.java  |   127 -
 .../tests/util/CommonUtils.java                 |    26 -
 .../tests/util/SubscriberThread.java            |    91 -
 .../tests/util/TestConfigKeys.java              |    34 -
 .../src/test/resources/gram.properties.template |    70 -
 .../src/test/resources/unit_test.properties     |    26 -
 .../airavata/workflow/engine/WorkflowUtils.java |    10 +-
 .../registry/JCRComponentRegistry.java          |     3 +-
 .../dialogs/workflow/WorkflowImportWindow.java  |     3 +-
 .../ui/experiment/LaunchApplicationWindow.java  |     8 +-
 .../RegistryWorkflowPublisherWindow.java        |     3 +-
 .../WorkflowInterpreterLaunchWindow.java        |     9 +-
 pom.xml                                         |     6 +-
 .../apache/airavata/gsi/ssh/GSSContextX509.java |    11 +-
 .../airavata/gsi/ssh/api/job/JobDescriptor.java |    14 +
 .../ssh/api/job/JobManagerConfiguration.java    |     9 +-
 .../gsi/ssh/api/job/LSFJobConfiguration.java    |   116 +
 .../gsi/ssh/api/job/LSFOutputParser.java        |   110 +
 .../airavata/gsi/ssh/api/job/OutputParser.java  |    14 +-
 .../gsi/ssh/api/job/PBSJobConfiguration.java    |    15 +
 .../gsi/ssh/api/job/PBSOutputParser.java        |     8 +-
 .../gsi/ssh/api/job/SGEOutputParser.java        |     8 +-
 .../gsi/ssh/api/job/SlurmJobConfiguration.java  |    15 +
 .../gsi/ssh/api/job/SlurmOutputParser.java      |    10 +-
 .../gsi/ssh/impl/GSISSHAbstractCluster.java     |    74 +-
 .../apache/airavata/gsi/ssh/impl/JobStatus.java |    20 +-
 .../airavata/gsi/ssh/impl/PBSCluster.java       |     4 +
 .../airavata/gsi/ssh/impl/RawCommandInfo.java   |     8 +-
 .../gsi/ssh/listener/JobSubmissionListener.java |     2 +-
 .../airavata/gsi/ssh/util/CommonUtils.java      |    13 +
 .../gsissh/src/main/resources/LSFTemplate.xslt  |    93 +
 .../main/resources/schemas/PBSJobDescriptor.xsd |     3 +-
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  |    25 +-
 .../gsi/ssh/impl/VanilaTestWithSSHAuth.java     |    48 +-
 tools/registry-tool/README                      |     2 +-
 383 files changed, 59870 insertions(+), 35784 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/handler/AiravataServerHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --cc airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 90b8e6d,ed141b9..f499345
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@@ -54,16 -55,16 +55,16 @@@ public class CreateLaunchExperiment 
  	
      private final static Logger logger = LoggerFactory.getLogger(CreateLaunchExperiment.class);
      private static final String DEFAULT_USER = "default.registry.user";
-     private static final String DEFAULT_GATEWAY = "default.registry.gateway";
+     private static final String DEFAULT_GATEWAY = "php_reference_gateway";
      private static Airavata.Client airavataClient;
  
 -    private static String echoAppId = "Echo_61988d1f-7ca9-47ba-9212-a0ac2e973cf1";
 +    private static String echoAppId = "Echo_1365a7fd-eae1-4575-b447-99afb4d79c82";
      private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9";
      private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
-     private static String amberAppId = "Amber_9e4f28b6-7a5d-4fe1-b07f-2053f8f0deb3";
+     private static String amberAppId = "Amber_aa083c86-4680-4002-b3ef-fad93c181926";
      private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
      private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
-     private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
+     private static String lammpsAppId = "LAMMPS_2472685b-8acf-497e-aafe-cc66fe5f4cb6";
      private static String nwchemAppId = "NWChem_2c8fee64-acf9-4a89-b6d3-91eb53c7640c";
      private static String trinityAppId = "Trinity_e894acf5-9bca-46e8-a1bd-7e2d5155191a";
      private static String autodockAppId = "AutoDock_43d9fdd0-c404-49f4-b913-3abf9080a8c9";
@@@ -89,9 -95,73 +95,74 @@@
      private static String fsdResourceId;
  
  
+     public static void getAvailableAppInterfaceComputeResources(String appInterfaceId) {
+         try {
+             Map<String, String> availableAppInterfaceComputeResources = airavataClient.getAvailableAppInterfaceComputeResources(appInterfaceId);
+             for (String key : availableAppInterfaceComputeResources.keySet()){
+                 System.out.println("id : " + key);
+                 System.out.println("name : " + availableAppInterfaceComputeResources.get(key));
+             }
+         } catch (AiravataSystemException e) {
+             e.printStackTrace();
+         } catch (InvalidRequestException e) {
+             e.printStackTrace();
+         } catch (AiravataClientException e) {
+             e.printStackTrace();
+         } catch (TException e) {
+             e.printStackTrace();
+         }
+ 
+     }
+ 
+ 
+     public static void createGateway(){
+         try {
+             Gateway gateway = new Gateway();
+             gateway.setGatewayId("testGatewayId2");
+             gateway.setGatewayName("testGateway2");
+             gatewayId = airavataClient.addGateway(gateway);
+             System.out.println(gatewayId);
+         } catch (AiravataSystemException e) {
+             e.printStackTrace();
+         } catch (InvalidRequestException e) {
+             e.printStackTrace();
+         } catch (AiravataClientException e) {
+             e.printStackTrace();
+         } catch (TException e) {
+             e.printStackTrace();
+         }
+ 
+     }
+ 
+     public static void getGateway(String gatewayId){
+         try {
+             Gateway gateway = airavataClient.getGateway(gatewayId);
+             gateway.setDomain("testDomain");
+             airavataClient.updateGateway(gatewayId, gateway);
+             List<Gateway> allGateways = airavataClient.getAllGateways();
+             System.out.println(allGateways.size());
+             if (airavataClient.isGatewayExist(gatewayId)){
+                 Gateway gateway1 = airavataClient.getGateway(gatewayId);
+                 System.out.println(gateway1.getGatewayName());
+             }
+             boolean b = airavataClient.deleteGateway("testGatewayId2");
+             System.out.println(b);
+         } catch (AiravataSystemException e) {
+             e.printStackTrace();
+         } catch (InvalidRequestException e) {
+             e.printStackTrace();
+         } catch (AiravataClientException e) {
+             e.printStackTrace();
+         } catch (TException e) {
+             e.printStackTrace();
+         }
+ 
+     }
+ 
+ 
      public static void createAndLaunchExp() throws TException {
  //        final String expId = createEchoExperimentForFSD(airavataClient);
 +        List<String> experimentIds = new ArrayList<String>();
          try {
              for (int i = 0; i < 1; i++) {
  //                final String expId = createExperimentForSSHHost(airavata);

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --cc modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
index 0000000,badf28d..64e0160
mode 000000,100644..100644
--- a/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
+++ b/modules/credential-store/credential-store-webapp/src/main/resources/airavata-server.properties
@@@ -1,0 -1,234 +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.
+ #
+ 
+ ###########################################################################
+ #
+ #  This properties file provides configuration for all Airavata Services:
+ #  API Server, Registry, Workflow Interpreter, GFac, Orchestrator
+ #
+ ###########################################################################
+ 
+ ###########################################################################
+ #  API Server Registry Configuration
+ ###########################################################################
+ 
+ #for derby [AiravataJPARegistry]
+ registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+ registry.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+ # MySql database configuration
+ #registry.jdbc.driver=com.mysql.jdbc.Driver
+ #registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
+ registry.jdbc.user=airavata
+ registry.jdbc.password=airavata
+ start.derby.server.mode=true
+ validationQuery=SELECT 1 from CONFIGURATION
+ jpa.cache.size=5000
+ #jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
+ 
+ # Properties for default user mode
+ default.registry.user=admin
+ default.registry.password=admin
+ default.registry.password.hash.method=SHA
+ default.registry.gateway=default
+ 
+ #ip=127.0.0.1
+ 
+ ###########################################################################
+ #  Application Catalog DB Configuration
+ ###########################################################################
+ #for derby [AiravataJPARegistry]
+ appcatalog.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+ appcatalog.jdbc.url=jdbc:derby://localhost:1527/app_catalog;create=true;user=airavata;password=airavata
+ # MySql database configuration
+ #appcatalog.jdbc.driver=com.mysql.jdbc.Driver
+ #appcatalog.jdbc.url=jdbc:mysql://localhost:3306/app_catalog
+ appcatalog.jdbc.user=airavata
+ appcatalog.jdbc.password=airavata
+ appcatalog.validationQuery=SELECT 1 from CONFIGURATION
+ 
+ ###########################################################################
+ #  Server module Configuration
+ ###########################################################################
+ 
+ servers=apiserver,orchestrator,gfac,workflowserver
+ #shutdown.trategy=NONE
+ shutdown.trategy=SELF_TERMINATE
+ 
+ 
+ apiserver.server.host=localhost
+ apiserver.server.port=8930
+ apiserver.server.min.threads=50
+ workflow.server.host=localhost
+ workflow.server.port=8931
+ orchestrator.server.host=localhost
+ orchestrator.server.port=8940
+ gfac.server.host=localhost
+ gfac.server.port=8950
+ orchestrator.server.min.threads=50
+ 
+ ###########################################################################
+ # Credential Store module Configuration
+ ###########################################################################
+ credential.store.keystore.url=/Users/lahirugunathilake/Downloads/airavata_sym.jks
+ credential.store.keystore.alias=airavata
+ credential.store.keystore.password=airavata
+ credential.store.jdbc.url=jdbc:derby://localhost:1527/experiment_catalog;create=true;user=airavata;password=airavata
+ credential.store.jdbc.user=airavata
+ credential.store.jdbc.password=airavata
+ credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+ 
+ notifier.enabled=false
+ #period in milliseconds
+ notifier.duration=5000
+ 
+ email.server=smtp.googlemail.com
+ email.server.port=465
+ email.user=airavata
+ email.password=xxx
+ email.ssl=true
+ email.from=airavata@apache.org
+ 
+ ###########################################################################
+ # Airavata GFac MyProxy GSI credentials to access Grid Resources.
+ ###########################################################################
+ #
+ # Security Configuration used by Airavata Generic Factory Service
+ #  to interact with Computational Resources.
+ #
+ gfac=org.apache.airavata.gfac.server.GfacServer
+ myproxy.server=myproxy.teragrid.org
+ myproxy.username=ogce
+ myproxy.password=
+ myproxy.life=3600
+ # XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
+ trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
+ # SSH PKI key pair or ssh password can be used SSH based authentication is used.
+ # if user specify both password authentication gets the higher preference
+ 
+ ################# ---------- For ssh key pair authentication ------------------- ################
+ #public.ssh.key=/path to public key for ssh
+ #ssh.username=username for ssh connection
+ #private.ssh.key=/path to private key file for ssh
+ #ssh.keypass=passphrase for the private key
+ 
+ 
+ ################# ---------- For ssh key pair authentication ------------------- ################
+ #ssh.username=username for ssh connection
+ #ssh.password=Password for ssh connection
+ 
+ 
+ 
+ ###########################################################################
+ # Airavata Workflow Interpreter Configurations
+ ###########################################################################
+ 
+ #runInThread=true
+ #provenance=true
+ #provenanceWriterThreadPoolSize=20
+ #gfac.embedded=true
+ #workflowserver=org.apache.airavata.api.server.WorkflowServer
+ 
+ 
+ ###########################################################################
+ # API Server module Configuration
+ ###########################################################################
+ apiserver=org.apache.airavata.api.server.AiravataAPIServer
+ 
+ ###########################################################################
+ # Workflow Server module Configuration
+ ###########################################################################
+ 
+ workflowserver=org.apache.airavata.api.server.WorkflowServer
+ 
+ ###########################################################################
+ # Advance configuration to change service implementations
+ ###########################################################################
+ # If false, disables two phase commit when submitting jobs
+ TwoPhase=true
+ #
+ # Class which implemented HostScheduler interface. It will determine the which host to submit the request
+ #
+ host.scheduler=org.apache.airavata.gfac.core.scheduler.impl.SimpleHostScheduler
+ 
+ ###########################################################################
+ # Monitoring module Configuration
+ ###########################################################################
+ 
+ #This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
+ #mechanisms and one would be able to start a monitor
+ monitors=org.apache.airavata.gfac.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.gfac.monitor.impl.LocalJobMonitor
+ 
+ 
+ ###########################################################################
+ # AMQP Notification Configuration
+ ###########################################################################
+ 
+ 
+ amqp.notification.enable=1
+ 
+ amqp.broker.host=localhost
+ amqp.broker.port=5672
+ amqp.broker.username=guest
+ amqp.broker.password=guest
+ 
+ amqp.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPSenderImpl
+ amqp.topic.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPTopicSenderImpl
+ amqp.broadcast.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPBroadcastSenderImpl
+ 
+ #,org.apache.airavata.gfac.monitor.impl.push.amqp.AMQPMonitor
+ #This is the amqp related configuration and this lists down the Rabbitmq host, this is an xsede specific configuration
+ amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
+ proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
+ connection.name=xsede
+ #publisher
+ activity.listeners=org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataTaskStatusUpdator,org.apache.airavata.gfac.core.monitor.AiravataWorkflowNodeStatusUpdator,org.apache.airavata.api.server.listener.AiravataExperimentStatusUpdator,org.apache.airavata.gfac.core.monitor.GfacInternalStatusUpdator,org.apache.airavata.workflow.engine.util.ProxyMonitorPublisher
+ publish.rabbitmq=false
 -activity.publisher=org.apache.airavata.messaging.core.impl.RabbitMQPublisher
++status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
++task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQTaskLaunchPublisher
+ rabbitmq.broker.url=amqp://localhost:5672
 -rabbitmq.exchange.name=airavata_rabbitmq_exchange
++rabbitmq.status.exchange.name=airavata_rabbitmq_exchange
++rabbitmq.task.launch.exchange.name=airavata_task_launch_rabbitmq_exchange
+ 
+ ###########################################################################
+ # Orchestrator module Configuration
+ ###########################################################################
+ 
+ #job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
 -job.submitter=org.apache.airavata.orchestrator.core.impl.GFACServiceJobSubmitter
++#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
++job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
+ job.validators=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
+ submitter.interval=10000
+ threadpool.size=10
+ start.submitter=true
+ embedded.mode=true
+ enable.validation=true
+ orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
+ 
+ ###########################################################################
+ # Zookeeper Server Configuration
+ ###########################################################################
+ 
+ embedded.zk=true
+ zookeeper.server.host=localhost
+ zookeeper.server.port=2181
+ airavata-server=/api-server
+ orchestrator-server=/orchestrator-server
+ gfac-server=/gfac-server
+ gfac-experiments=/gfac-experiments
+ gfac-server-name=gfac-node0
+ orchestrator-server-name=orch-node0
+ airavata-server-name=api-node0

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --cc modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index cca793e,4973a41..88979a4
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@@ -27,7 -27,10 +27,11 @@@ import org.apache.aiaravata.application
  import org.apache.airavata.common.exception.ApplicationSettingsException;
  import org.apache.airavata.common.logger.AiravataLogger;
  import org.apache.airavata.common.logger.AiravataLoggerFactory;
 +import org.apache.airavata.common.utils.*;
+ import org.apache.airavata.common.utils.AiravataZKUtils;
+ import org.apache.airavata.common.utils.Constants;
+ import org.apache.airavata.common.utils.MonitorPublisher;
+ import org.apache.airavata.common.utils.ServerSettings;
  import org.apache.airavata.gfac.core.cpi.BetterGfacImpl;
  import org.apache.airavata.gfac.core.cpi.GFac;
  import org.apache.airavata.gfac.core.utils.GFacThreadPoolExecutor;

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
----------------------------------------------------------------------
diff --cc modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
index 0000000,53d08d3..3f876ae
mode 000000,100644..100644
--- a/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
+++ b/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/RabbitMQListener.java
@@@ -1,0 -1,228 +1,228 @@@
+ /*
+  *
+  * Licensed to the Apache Software Foundation (ASF) under one
+  * or more contributor license agreements.  See the NOTICE file
+  * distributed with this work for additional information
+  * regarding copyright ownership.  The ASF licenses this file
+  * to you under the Apache License, Version 2.0 (the
+  * "License"); you may not use this file except in compliance
+  * with the License.  You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing,
+  * software distributed under the License is distributed on an
+  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  * KIND, either express or implied.  See the License for the
+  * specific language governing permissions and limitations
+  * under the License.
+  *
+  */
+ 
+ package org.apache.airavata.messaging.client;
+ 
+ import org.apache.airavata.common.exception.ApplicationSettingsException;
+ import org.apache.airavata.common.utils.AiravataUtils;
+ import org.apache.airavata.common.utils.ServerSettings;
+ import org.apache.airavata.common.utils.ThriftUtils;
+ import org.apache.airavata.messaging.core.MessageContext;
+ import org.apache.airavata.messaging.core.MessageHandler;
+ import org.apache.airavata.messaging.core.MessagingConstants;
 -import org.apache.airavata.messaging.core.impl.RabbitMQConsumer;
++import org.apache.airavata.messaging.core.impl.RabbitMQStatusConsumer;
+ import org.apache.airavata.model.messaging.event.*;
+ import org.apache.commons.cli.*;
+ import org.apache.thrift.TBase;
+ import org.apache.thrift.TException;
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+ 
+ import java.io.*;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+ 
+ 
+ public class RabbitMQListener {
+     public static final String RABBITMQ_BROKER_URL = "rabbitmq.broker.url";
+     public static final String RABBITMQ_EXCHANGE_NAME = "rabbitmq.exchange.name";
+     private final static Logger logger = LoggerFactory.getLogger(RabbitMQListener.class);
+     private static String gatewayId = "*";
+     private static boolean gatewayLevelMessages = false;
+     private static boolean experimentLevelMessages = false;
+     private static boolean jobLevelMessages = false;
+     private static String experimentId = "*";
+     private static String jobId = "*";
+     private static boolean allMessages = false;
+ 
+     public static void main(String[] args) {
+         File file = new File("/tmp/latency_client");
+         parseArguments(args);
+         try {
+             FileOutputStream fos = new FileOutputStream(file, false);
+             final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos));
+             AiravataUtils.setExecutionAsServer();
+             String brokerUrl = ServerSettings.getSetting(RABBITMQ_BROKER_URL);
+             System.out.println("broker url " + brokerUrl);
+             final String exchangeName = ServerSettings.getSetting(RABBITMQ_EXCHANGE_NAME);
 -            RabbitMQConsumer consumer = new RabbitMQConsumer(brokerUrl, exchangeName);
++            RabbitMQStatusConsumer consumer = new RabbitMQStatusConsumer(brokerUrl, exchangeName);
+             consumer.listen(new MessageHandler() {
+                 @Override
+                 public Map<String, Object> getProperties() {
+                     Map<String, Object> props = new HashMap<String, Object>();
+                     List<String> routingKeys = new ArrayList<String>();
+                     if (allMessages){
+                         routingKeys.add("*");
+                         routingKeys.add("*.*");
+                         routingKeys.add("*.*.*");
+                         routingKeys.add("*.*.*.*");
+                         routingKeys.add("*.*.*.*.*");
+                     }else {
+                         if (gatewayLevelMessages){
+                             routingKeys.add(gatewayId);
+                             routingKeys.add(gatewayId + ".*");
+                             routingKeys.add(gatewayId + ".*.*");
+                             routingKeys.add(gatewayId + ".*.*.*");
+                             routingKeys.add(gatewayId + ".*.*.*.*");
+                         }else if (experimentLevelMessages){
+                             routingKeys.add(gatewayId);
+                             routingKeys.add(gatewayId + "." + experimentId);
+                             routingKeys.add(gatewayId + "." + experimentId+ ".*");
+                             routingKeys.add(gatewayId + "." + experimentId+ ".*.*");
+                             routingKeys.add(gatewayId + "." + experimentId+ ".*.*.*");
+                         }else if  (jobLevelMessages){
+                             routingKeys.add(gatewayId);
+                             routingKeys.add(gatewayId + "." + experimentId);
+                             routingKeys.add(gatewayId + "." + experimentId+ ".*");
+                             routingKeys.add(gatewayId + "." + experimentId+ ".*.*");
+                             routingKeys.add(gatewayId + "." + experimentId+ ".*." + jobId);
+                         }
+                     }
+                     props.put(MessagingConstants.RABBIT_ROUTING_KEY, routingKeys);
+                     return props;
+                 }
+ 
+                 @Override
+                 public void onMessage(MessageContext message) {
+                     try {
+                         long latency = System.currentTimeMillis() - message.getUpdatedTime().getTime();
+                         bw.write(message.getMessageId() + " :" + latency);
+                         bw.newLine();
+                         bw.flush();
+                     } catch (IOException e) {
+                         e.printStackTrace();
+                     }
+                     if (message.getType().equals(MessageType.EXPERIMENT)){
+                         try {
+                             ExperimentStatusChangeEvent event = new ExperimentStatusChangeEvent();
+                             TBase messageEvent = message.getEvent();
+                             byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                             ThriftUtils.createThriftFromBytes(bytes, event);
+                             System.out.println(" Message Received with message id '" + message.getMessageId()
+                                     + "' and with message type '" + message.getType() + "' and with state : '" + event.getState().toString() +
+                                        " for Gateway " + event.getGatewayId());
+                         } catch (TException e) {
+                             logger.error(e.getMessage(), e);
+                         }
+                     }else if (message.getType().equals(MessageType.WORKFLOWNODE)){
+                         try {
+                             WorkflowNodeStatusChangeEvent event = new WorkflowNodeStatusChangeEvent();
+                             TBase messageEvent = message.getEvent();
+                             byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                             ThriftUtils.createThriftFromBytes(bytes, event);
+                             System.out.println(" Message Received with message id '" + message.getMessageId()
+                                     + "' and with message type '" + message.getType() + "' and with state : '" + event.getState().toString() +
+                                     " for Gateway " + event.getWorkflowNodeIdentity().getGatewayId());
+                         } catch (TException e) {
+                             logger.error(e.getMessage(), e);
+                         }
+                     }else if (message.getType().equals(MessageType.TASK)){
+                         try {
+                             TaskStatusChangeEvent event = new TaskStatusChangeEvent();
+                             TBase messageEvent = message.getEvent();
+                             byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                             ThriftUtils.createThriftFromBytes(bytes, event);
+                             System.out.println(" Message Received with message id '" + message.getMessageId()
+                                     + "' and with message type '" + message.getType() + "' and with state : '" + event.getState().toString() +
+                                     " for Gateway " + event.getTaskIdentity().getGatewayId());
+                         } catch (TException e) {
+                             logger.error(e.getMessage(), e);
+                         }
+                     }else if (message.getType().equals(MessageType.JOB)){
+                         try {
+                             JobStatusChangeEvent event = new JobStatusChangeEvent();
+                             TBase messageEvent = message.getEvent();
+                             byte[] bytes = ThriftUtils.serializeThriftObject(messageEvent);
+                             ThriftUtils.createThriftFromBytes(bytes, event);
+                             System.out.println(" Message Received with message id '" + message.getMessageId()
+                                     + "' and with message type '" + message.getType() + "' and with state : '" + event.getState().toString() +
+                                     " for Gateway " + event.getJobIdentity().getGatewayId());
+                         } catch (TException e) {
+                             logger.error(e.getMessage(), e);
+                         }
+                     }
+                 }
+             });
+         } catch (ApplicationSettingsException e) {
+             logger.error("Error reading airavata server properties", e);
+         }catch (Exception e) {
+            logger.error(e.getMessage(), e);
+         }
+ 
+     }
+ 
+     public static void parseArguments(String[] args) {
+         try{
+             Options options = new Options();
+ 
+             options.addOption("gId", true , "Gateway ID");
+             options.addOption("eId", true, "Experiment ID");
+             options.addOption("jId", true, "Job ID");
+             options.addOption("a", false, "All Notifications");
+ 
+             CommandLineParser parser = new PosixParser();
+             CommandLine cmd = parser.parse( options, args);
+             if (cmd.getOptions() == null || cmd.getOptions().length == 0){
+                 logger.info("You have not specified any options. We assume you need to listen to all the messages...");
+                 allMessages = true;
+                 gatewayId = "*";
+             }
+             if (cmd.hasOption("a")){
+                 logger.info("Listening to all the messages...");
+                 allMessages = true;
+                 gatewayId = "*";
+             }else {
+                 gatewayId = cmd.getOptionValue("gId");
+                 if (gatewayId == null){
+                     gatewayId = "*";
+                     logger.info("You have not specified a gateway id. We assume you need to listen to all the messages...");
+                 } else {
+                     gatewayLevelMessages = true;
+                 }
+                 experimentId = cmd.getOptionValue("eId");
+                 if (experimentId == null && !gatewayId.equals("*")){
+                     experimentId = "*";
+                     logger.info("You have not specified a experiment id. We assume you need to listen to all the messages for the gateway with id " + gatewayId);
+                 } else if (experimentId == null && gatewayId.equals("*")) {
+                     experimentId = "*";
+                     logger.info("You have not specified a experiment id and a gateway id. We assume you need to listen to all the messages...");
+                 }else {
+                     experimentLevelMessages = true;
+                 }
+                 jobId = cmd.getOptionValue("jId");
+                 if (jobId == null && !gatewayId.equals("*") && !experimentId.equals("*")){
+                     jobId = "*";
+                     logger.info("You have not specified a job id. We assume you need to listen to all the messages for the gateway with id " + gatewayId
+                             + " with experiment id : " + experimentId );
+                 } else if (jobId == null && gatewayId.equals("*") && experimentId.equals("*")) {
+                     jobId = "*";
+                     logger.info("You have not specified a job Id or experiment Id or a gateway Id. We assume you need to listen to all the messages...");
+                 }else {
+                     jobLevelMessages = true;
+                 }
+             }
+         } catch (ParseException e) {
+             logger.error("Error while reading command line parameters" , e);
+         }
+     }
+ }

http://git-wip-us.apache.org/repos/asf/airavata/blob/48be39fe/pom.xml
----------------------------------------------------------------------


Mime
View raw message