Initial version of the Orchestrator Thrift Service - AIRAVATA-1007
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/94aee747
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/94aee747
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/94aee747
Branch: refs/heads/master
Commit: 94aee747dcf796178dcb17f9d994bd3f7428b585
Parents: dd5dbbd
Author: Suresh Marru <smarru@apache.org>
Authored: Tue Feb 25 08:59:40 2014 -0500
Committer: Suresh Marru <smarru@apache.org>
Committed: Tue Feb 25 08:59:40 2014 -0500
----------------------------------------------------------------------
.../airavata-orchestrator-service/pom.xml | 48 +
.../client/OrchestratorClientFactory.java | 45 +
.../orchestrator/cpi/OrchestratorService.java | 2546 ++++++++++++++++++
.../cpi/orchestrator_cpi_serviceConstants.java | 55 +
.../orchestrator/server/OrchestratorServer.java | 66 +
.../server/OrchestratorServerHandler.java | 59 +
.../generate-orchestrator-stubs.sh | 132 +
.../orchestrator.cpi.service.thrift | 47 +
modules/orchestrator/pom.xml | 8 +-
9 files changed, 3004 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/94aee747/modules/orchestrator/airavata-orchestrator-service/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/pom.xml b/modules/orchestrator/airavata-orchestrator-service/pom.xml
new file mode 100644
index 0000000..edb37ab
--- /dev/null
+++ b/modules/orchestrator/airavata-orchestrator-service/pom.xml
@@ -0,0 +1,48 @@
+<?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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>orchestrator</artifactId>
+ <groupId>org.apache.airavata</groupId>
+ <version>0.12-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <name>Airavata Orchestrator Service</name>
+ <artifactId>airavata-orchestrator-service</artifactId>
+ <packaging>jar</packaging>
+ <url>http://airavata.apache.org/</url>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>${thrift.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ </properties>
+
+</project>
http://git-wip-us.apache.org/repos/asf/airavata/blob/94aee747/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactory.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactory.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactory.java
new file mode 100644
index 0000000..8503563
--- /dev/null
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactory.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.orchestrator.client;
+
+import org.apache.airavata.orchestrator.cpi.OrchestratorService;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+
+public class OrchestratorClientFactory {
+
+ public OrchestratorService.Client createOrchestratorClient(String serverHost, int serverPort){
+ try {
+ TTransport transport = new TSocket(serverHost, serverPort);
+ transport.open();
+ TProtocol protocol = new TBinaryProtocol(transport);
+ return new OrchestratorService.Client(protocol);
+ } catch (TTransportException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+}
|