airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [18/23] airavata git commit: Merged the changes. AIRAVATA-1471
Date Fri, 07 Nov 2014 00:11:33 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java
b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java
index dee8ff9..e5048a2 100644
--- a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/client/AiravataClientFactory.java
@@ -23,8 +23,6 @@ package org.apache.airavata.api.client;
 
 import org.apache.airavata.api.Airavata;
 
-import org.apache.airavata.api.Workflow;
-//import org.apache.airavata.api.appcatalog.ApplicationCatalogAPI;
 import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
@@ -49,31 +47,4 @@ public class AiravataClientFactory {
             throw new AiravataClientConnectException("Unable to connect to the server at
"+serverHost+":"+serverPort);
         }
     }
-    
-    public static Workflow.Client createWorkflowClient(String serverHost, int serverPort)
throws AiravataClientConnectException{
-        try {
-            TTransport transport = new TSocket(serverHost, serverPort);
-            transport.open();
-            TProtocol protocol = new TBinaryProtocol(transport);
-//            TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "AppCatalog");
-            return new Workflow.Client(protocol);
-        } catch (TTransportException e) {
-            throw new AiravataClientConnectException("Unable to connect to the server at
"+serverHost+":"+serverPort);
-        }
-    }
-//    
-    /*
-    public static <T extends org.apache.thrift.TServiceClient> T createApplicationCatalogClient(String
serverHost, int serverPort, Class<T> type) throws Exception{
-        try {
-            TTransport transport = new TSocket(serverHost, serverPort);
-            transport.open();
-            TProtocol protocol = new TBinaryProtocol(transport);
-            TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "AppCatalog");
-            return  type.getConstructor(TProtocol.class).newInstance(mp);
-        } catch (TTransportException e) {
-            throw new AiravataClientConnectException("Unable to connect to the server at
"+serverHost+":"+serverPort);
-        } catch (Exception e) {
-			throw new Exception("Invalid Airavata API Service "+type.getClass().getCanonicalName());
-		}
-    }*/
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git 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
index 2845bc6..f039988 100644
--- 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
@@ -53,9 +53,9 @@ public class CreateLaunchExperiment {
     private static final String DEFAULT_GATEWAY = "default.registry.gateway";
     private static Airavata.Client airavataClient;
 
-    private static String echoAppId = "Echo_6281480a-9887-4a0f-8311-59bbaf738e54";
-    private static String wrfAppId = "WRF_5f097c9c-7066-49ec-aed7-4e39607b3adc";
-    private static String amberAppId = "Amber_89906be6-5678-49a6-9d04-a0604fbdef2e";
+    private static String echoAppId = "Echo_636b4530-6fb2-4c9e-998a-b41e648aa70f";
+    private static String wrfAppId = "WRF_d41bdc86-e280-4eb6-a045-708f69a8c116";
+    private static String amberAppId = "Amber_b23ee051-90d6-4892-827e-622a2f6c95ee";
 
     private static String localHost = "localhost";
     private static String trestlesHostName = "trestles.sdsc.xsede.org";
@@ -70,7 +70,7 @@ public class CreateLaunchExperiment {
     public static void main(String[] args) throws Exception {
                 airavataClient = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST,
THRIFT_SERVER_PORT);
                 System.out.println("API version is " + airavataClient.getAPIVersion());
-                registerApplications(); // run this only the first time
+    //            registerApplications(); // run this only the first time
                 createAndLaunchExp();
     }
     
@@ -79,9 +79,9 @@ public class CreateLaunchExperiment {
     
     
     public static void createAndLaunchExp() throws TException {
-    	final String expId = createEchoExperimentForFSD(airavataClient);
+    final String expId = createEchoExperimentForFSD(airavataClient);
     	try {
-        for (int i = 0; i < 2; i++) {
+        for (int i = 0; i < 1; i++) {
 //    final String expId = createExperimentForSSHHost(airavata);
 //            final String expId = createEchoExperimentForFSD(airavataClient);
 //    final String expId = createEchoExperimentForStampede(airavataClient);

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
index 20cde47..78cfbb5 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/RegistryWindow.java
@@ -202,8 +202,8 @@ public class RegistryWindow {
     	case API_SERVICE:
     		AiravataClientFactory.createAiravataClient(getServerName(), Integer.parseInt(getServerPort()));
break;
     	case WORKFLOW_SERVICE:
-    		AiravataClientFactory.createWorkflowClient(getServerName(), Integer.parseInt(getServerPort()));
break;
-    	}
+    		AiravataClientFactory.createAiravataClient(getServerName(), Integer.parseInt(getServerPort()));
break;
+        }
         
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
index dfe62c6..1fdd878 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/workflow/WorkflowImportWindow.java
@@ -35,7 +35,7 @@ import javax.swing.border.EtchedBorder;
 import javax.swing.border.TitledBorder;
 import javax.xml.namespace.QName;
 
-import org.apache.airavata.api.Workflow.Client;
+import org.apache.airavata.api.Airavata.Client;
 import org.apache.airavata.api.client.AiravataClientFactory;
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.model.error.AiravataClientException;
@@ -79,7 +79,7 @@ public class WorkflowImportWindow {
         this.engine = engine;
         if (engine.getGUI().setupThriftClientData(ThriftServiceType.WORKFLOW_SERVICE)) {
         	ThriftClientData thriftClientData = engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE);
-        	setClient(AiravataClientFactory.createWorkflowClient(thriftClientData.getServerAddress(),
thriftClientData.getServerPort()));
+        	setClient(AiravataClientFactory.createAiravataClient(thriftClientData.getServerAddress(),
thriftClientData.getServerPort()));
             initGUI();
         } else {
         	throw new Exception("Thrift data not setup for workflow service!!!");

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
index dde473a..7bade97 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/RegistryWorkflowPublisherWindow.java
@@ -32,8 +32,8 @@ import javax.swing.JPanel;
 import javax.swing.border.EtchedBorder;
 import javax.swing.border.TitledBorder;
 
+import org.apache.airavata.api.Airavata.Client;
 import org.apache.airavata.api.client.AiravataClientFactory;
-
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.model.error.AiravataClientConnectException;
 import org.apache.airavata.model.error.AiravataClientException;
@@ -91,7 +91,7 @@ public class RegistryWorkflowPublisherWindow {
         try {
         	if (engine.getGUI().setupThriftClientData(ThriftServiceType.WORKFLOW_SERVICE)){
         		ThriftClientData thriftClientData = engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE);
-				org.apache.airavata.api.Workflow.Client client = AiravataClientFactory.createWorkflowClient(thriftClientData.getServerAddress(),
thriftClientData.getServerPort());
+				Client client = AiravataClientFactory.createAiravataClient(thriftClientData.getServerAddress(),
thriftClientData.getServerPort());
     			if (client.isWorkflowExistWithName(workflowTemplateName)){
     				int result = JOptionPane.showConfirmDialog(this.dialog.getDialog(), "A workflow with
the name "+workflowTemplateName+" already exists. Do you want to update it?", "Register Workflow",
JOptionPane.YES_NO_CANCEL_OPTION);
     				if (result==JOptionPane.NO_OPTION){

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
index 775e82a..76a745a 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
@@ -260,7 +260,7 @@ public class WorkflowInterpreterLaunchWindow {
     	ThriftClientData thriftClientData = engine.getConfiguration().getThriftClientData(ThriftServiceType.API_SERVICE);
 		Client airavataClient = XBayaUtil.getAiravataClient(thriftClientData);
 
-		org.apache.airavata.api.Workflow.Client workflowClient = XBayaUtil.getWorkflowClient(engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE));
+		Client workflowClient = XBayaUtil.getAiravataClient(engine.getConfiguration().getThriftClientData(ThriftServiceType.WORKFLOW_SERVICE));
 
 		Workflow workflowClone = workflow.clone();
 		workflowClone.setName(workflowClone.getName()+UUID.randomUUID().toString());

http://git-wip-us.apache.org/repos/asf/airavata/blob/9e6f748c/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
index dc20c21..ad827b7 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/XBayaUtil.java
@@ -31,7 +31,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.airavata.api.Airavata;
-import org.apache.airavata.api.Workflow.Client;
+import org.apache.airavata.api.Airavata.Client;
 import org.apache.airavata.api.client.AiravataClientFactory;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.model.error.AiravataClientConnectException;
@@ -252,7 +252,7 @@ public class XBayaUtil {
 	}
 	
 	public static Client getWorkflowClient(ThriftClientData data) throws AiravataClientConnectException{
-		return AiravataClientFactory.createWorkflowClient(data.getServerAddress(),data.getServerPort());
+		return AiravataClientFactory.createAiravataClient(data.getServerAddress(),data.getServerPort());
 	}
 	
 


Mime
View raw message