http://git-wip-us.apache.org/repos/asf/airavata/blob/8e83408a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/gateway/cpi/GatewayProfileService.java ---------------------------------------------------------------------- diff --git a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/gateway/cpi/GatewayProfileService.java b/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/gateway/cpi/GatewayProfileService.java deleted file mode 100644 index 3d5d019..0000000 --- a/airavata-services/profile-service/profile-service-stubs/src/main/java/org/apache/airavata/service/profile/gateway/cpi/GatewayProfileService.java +++ /dev/null @@ -1,6865 +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. - */ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.airavata.service.profile.gateway.cpi; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-03-06") -public class GatewayProfileService { - - public interface Iface { - - public String getAPIVersion() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - public String addGateway(org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - public boolean updateGateway(String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - public org.apache.airavata.model.workspace.Gateway getGateway(String gatewayId) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - public boolean deleteGateway(String gatewayId) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - public List<org.apache.airavata.model.workspace.Gateway> getAllGateways() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - public boolean isGatewayExist(String gatewayId) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void addGateway(org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void updateGateway(String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getAllGateways(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void isGatewayExist(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - } - - public static class Client extends org.apache.thrift.TServiceClient implements Iface { - public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { - public Factory() {} - public Client getClient(org.apache.thrift.protocol.TProtocol prot) { - return new Client(prot); - } - public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - return new Client(iprot, oprot); - } - } - - public Client(org.apache.thrift.protocol.TProtocol prot) - { - super(prot, prot); - } - - public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - super(iprot, oprot); - } - - public String getAPIVersion() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_getAPIVersion(); - return recv_getAPIVersion(); - } - - public void send_getAPIVersion() throws org.apache.thrift.TException - { - getAPIVersion_args args = new getAPIVersion_args(); - sendBase("getAPIVersion", args); - } - - public String recv_getAPIVersion() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - getAPIVersion_result result = new getAPIVersion_result(); - receiveBase(result, "getAPIVersion"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result"); - } - - public String addGateway(org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_addGateway(gateway); - return recv_addGateway(); - } - - public void send_addGateway(org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.thrift.TException - { - addGateway_args args = new addGateway_args(); - args.setGateway(gateway); - sendBase("addGateway", args); - } - - public String recv_addGateway() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - addGateway_result result = new addGateway_result(); - receiveBase(result, "addGateway"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addGateway failed: unknown result"); - } - - public boolean updateGateway(String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_updateGateway(gatewayId, updatedGateway); - return recv_updateGateway(); - } - - public void send_updateGateway(String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway) throws org.apache.thrift.TException - { - updateGateway_args args = new updateGateway_args(); - args.setGatewayId(gatewayId); - args.setUpdatedGateway(updatedGateway); - sendBase("updateGateway", args); - } - - public boolean recv_updateGateway() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - updateGateway_result result = new updateGateway_result(); - receiveBase(result, "updateGateway"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateGateway failed: unknown result"); - } - - public org.apache.airavata.model.workspace.Gateway getGateway(String gatewayId) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_getGateway(gatewayId); - return recv_getGateway(); - } - - public void send_getGateway(String gatewayId) throws org.apache.thrift.TException - { - getGateway_args args = new getGateway_args(); - args.setGatewayId(gatewayId); - sendBase("getGateway", args); - } - - public org.apache.airavata.model.workspace.Gateway recv_getGateway() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - getGateway_result result = new getGateway_result(); - receiveBase(result, "getGateway"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGateway failed: unknown result"); - } - - public boolean deleteGateway(String gatewayId) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_deleteGateway(gatewayId); - return recv_deleteGateway(); - } - - public void send_deleteGateway(String gatewayId) throws org.apache.thrift.TException - { - deleteGateway_args args = new deleteGateway_args(); - args.setGatewayId(gatewayId); - sendBase("deleteGateway", args); - } - - public boolean recv_deleteGateway() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - deleteGateway_result result = new deleteGateway_result(); - receiveBase(result, "deleteGateway"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteGateway failed: unknown result"); - } - - public List<org.apache.airavata.model.workspace.Gateway> getAllGateways() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_getAllGateways(); - return recv_getAllGateways(); - } - - public void send_getAllGateways() throws org.apache.thrift.TException - { - getAllGateways_args args = new getAllGateways_args(); - sendBase("getAllGateways", args); - } - - public List<org.apache.airavata.model.workspace.Gateway> recv_getAllGateways() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - getAllGateways_result result = new getAllGateways_result(); - receiveBase(result, "getAllGateways"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllGateways failed: unknown result"); - } - - public boolean isGatewayExist(String gatewayId) throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - send_isGatewayExist(gatewayId); - return recv_isGatewayExist(); - } - - public void send_isGatewayExist(String gatewayId) throws org.apache.thrift.TException - { - isGatewayExist_args args = new isGatewayExist_args(); - args.setGatewayId(gatewayId); - sendBase("isGatewayExist", args); - } - - public boolean recv_isGatewayExist() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException - { - isGatewayExist_result result = new isGatewayExist_result(); - receiveBase(result, "isGatewayExist"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.gatewayProfileException != null) { - throw result.gatewayProfileException; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isGatewayExist failed: unknown result"); - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { - private org.apache.thrift.async.TAsyncClientManager clientManager; - private org.apache.thrift.protocol.TProtocolFactory protocolFactory; - public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); - } - - public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall { - public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAPIVersion_args args = new getAPIVersion_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getAPIVersion(); - } - } - - public void addGateway(org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - addGateway_call method_call = new addGateway_call(gateway, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class addGateway_call extends org.apache.thrift.async.TAsyncMethodCall { - private org.apache.airavata.model.workspace.Gateway gateway; - public addGateway_call(org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.gateway = gateway; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - addGateway_args args = new addGateway_args(); - args.setGateway(gateway); - args.write(prot); - prot.writeMessageEnd(); - } - - public String getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_addGateway(); - } - } - - public void updateGateway(String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - updateGateway_call method_call = new updateGateway_call(gatewayId, updatedGateway, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class updateGateway_call extends org.apache.thrift.async.TAsyncMethodCall { - private String gatewayId; - private org.apache.airavata.model.workspace.Gateway updatedGateway; - public updateGateway_call(String gatewayId, org.apache.airavata.model.workspace.Gateway updatedGateway, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.gatewayId = gatewayId; - this.updatedGateway = updatedGateway; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - updateGateway_args args = new updateGateway_args(); - args.setGatewayId(gatewayId); - args.setUpdatedGateway(updatedGateway); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_updateGateway(); - } - } - - public void getGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getGateway_call method_call = new getGateway_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getGateway_call extends org.apache.thrift.async.TAsyncMethodCall { - private String gatewayId; - public getGateway_call(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.gatewayId = gatewayId; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getGateway_args args = new getGateway_args(); - args.setGatewayId(gatewayId); - args.write(prot); - prot.writeMessageEnd(); - } - - public org.apache.airavata.model.workspace.Gateway getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getGateway(); - } - } - - public void deleteGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteGateway_call method_call = new deleteGateway_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteGateway_call extends org.apache.thrift.async.TAsyncMethodCall { - private String gatewayId; - public deleteGateway_call(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.gatewayId = gatewayId; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteGateway_args args = new deleteGateway_args(); - args.setGatewayId(gatewayId); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_deleteGateway(); - } - } - - public void getAllGateways(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getAllGateways_call method_call = new getAllGateways_call(resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getAllGateways_call extends org.apache.thrift.async.TAsyncMethodCall { - public getAllGateways_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllGateways", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllGateways_args args = new getAllGateways_args(); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<org.apache.airavata.model.workspace.Gateway> getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getAllGateways(); - } - } - - public void isGatewayExist(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - isGatewayExist_call method_call = new isGatewayExist_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class isGatewayExist_call extends org.apache.thrift.async.TAsyncMethodCall { - private String gatewayId; - public isGatewayExist_call(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.gatewayId = gatewayId; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isGatewayExist", org.apache.thrift.protocol.TMessageType.CALL, 0)); - isGatewayExist_args args = new isGatewayExist_args(); - args.setGatewayId(gatewayId); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_isGatewayExist(); - } - } - - } - - public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); - } - - protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { - processMap.put("getAPIVersion", new getAPIVersion()); - processMap.put("addGateway", new addGateway()); - processMap.put("updateGateway", new updateGateway()); - processMap.put("getGateway", new getGateway()); - processMap.put("deleteGateway", new deleteGateway()); - processMap.put("getAllGateways", new getAllGateways()); - processMap.put("isGatewayExist", new isGatewayExist()); - return processMap; - } - - public static class getAPIVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAPIVersion_args> { - public getAPIVersion() { - super("getAPIVersion"); - } - - public getAPIVersion_args getEmptyArgsInstance() { - return new getAPIVersion_args(); - } - - protected boolean isOneway() { - return false; - } - - public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException { - getAPIVersion_result result = new getAPIVersion_result(); - try { - result.success = iface.getAPIVersion(); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - public static class addGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addGateway_args> { - public addGateway() { - super("addGateway"); - } - - public addGateway_args getEmptyArgsInstance() { - return new addGateway_args(); - } - - protected boolean isOneway() { - return false; - } - - public addGateway_result getResult(I iface, addGateway_args args) throws org.apache.thrift.TException { - addGateway_result result = new addGateway_result(); - try { - result.success = iface.addGateway(args.gateway); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - public static class updateGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateGateway_args> { - public updateGateway() { - super("updateGateway"); - } - - public updateGateway_args getEmptyArgsInstance() { - return new updateGateway_args(); - } - - protected boolean isOneway() { - return false; - } - - public updateGateway_result getResult(I iface, updateGateway_args args) throws org.apache.thrift.TException { - updateGateway_result result = new updateGateway_result(); - try { - result.success = iface.updateGateway(args.gatewayId, args.updatedGateway); - result.setSuccessIsSet(true); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - public static class getGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGateway_args> { - public getGateway() { - super("getGateway"); - } - - public getGateway_args getEmptyArgsInstance() { - return new getGateway_args(); - } - - protected boolean isOneway() { - return false; - } - - public getGateway_result getResult(I iface, getGateway_args args) throws org.apache.thrift.TException { - getGateway_result result = new getGateway_result(); - try { - result.success = iface.getGateway(args.gatewayId); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - public static class deleteGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteGateway_args> { - public deleteGateway() { - super("deleteGateway"); - } - - public deleteGateway_args getEmptyArgsInstance() { - return new deleteGateway_args(); - } - - protected boolean isOneway() { - return false; - } - - public deleteGateway_result getResult(I iface, deleteGateway_args args) throws org.apache.thrift.TException { - deleteGateway_result result = new deleteGateway_result(); - try { - result.success = iface.deleteGateway(args.gatewayId); - result.setSuccessIsSet(true); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - public static class getAllGateways<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllGateways_args> { - public getAllGateways() { - super("getAllGateways"); - } - - public getAllGateways_args getEmptyArgsInstance() { - return new getAllGateways_args(); - } - - protected boolean isOneway() { - return false; - } - - public getAllGateways_result getResult(I iface, getAllGateways_args args) throws org.apache.thrift.TException { - getAllGateways_result result = new getAllGateways_result(); - try { - result.success = iface.getAllGateways(); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - public static class isGatewayExist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isGatewayExist_args> { - public isGatewayExist() { - super("isGatewayExist"); - } - - public isGatewayExist_args getEmptyArgsInstance() { - return new isGatewayExist_args(); - } - - protected boolean isOneway() { - return false; - } - - public isGatewayExist_result getResult(I iface, isGatewayExist_args args) throws org.apache.thrift.TException { - isGatewayExist_result result = new isGatewayExist_result(); - try { - result.success = iface.isGatewayExist(args.gatewayId); - result.setSuccessIsSet(true); - } catch (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - result.gatewayProfileException = gatewayProfileException; - } - return result; - } - } - - } - - public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); - } - - protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { - processMap.put("getAPIVersion", new getAPIVersion()); - processMap.put("addGateway", new addGateway()); - processMap.put("updateGateway", new updateGateway()); - processMap.put("getGateway", new getGateway()); - processMap.put("deleteGateway", new deleteGateway()); - processMap.put("getAllGateways", new getAllGateways()); - processMap.put("isGatewayExist", new isGatewayExist()); - return processMap; - } - - public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, String> { - public getAPIVersion() { - super("getAPIVersion"); - } - - public getAPIVersion_args getEmptyArgsInstance() { - return new getAPIVersion_args(); - } - - public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<String>() { - public void onComplete(String o) { - getAPIVersion_result result = new getAPIVersion_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getAPIVersion_result result = new getAPIVersion_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { - iface.getAPIVersion(resultHandler); - } - } - - public static class addGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addGateway_args, String> { - public addGateway() { - super("addGateway"); - } - - public addGateway_args getEmptyArgsInstance() { - return new addGateway_args(); - } - - public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<String>() { - public void onComplete(String o) { - addGateway_result result = new addGateway_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - addGateway_result result = new addGateway_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, addGateway_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { - iface.addGateway(args.gateway,resultHandler); - } - } - - public static class updateGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateGateway_args, Boolean> { - public updateGateway() { - super("updateGateway"); - } - - public updateGateway_args getEmptyArgsInstance() { - return new updateGateway_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - updateGateway_result result = new updateGateway_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - updateGateway_result result = new updateGateway_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, updateGateway_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.updateGateway(args.gatewayId, args.updatedGateway,resultHandler); - } - } - - public static class getGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGateway_args, org.apache.airavata.model.workspace.Gateway> { - public getGateway() { - super("getGateway"); - } - - public getGateway_args getEmptyArgsInstance() { - return new getGateway_args(); - } - - public AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway>() { - public void onComplete(org.apache.airavata.model.workspace.Gateway o) { - getGateway_result result = new getGateway_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getGateway_result result = new getGateway_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getGateway_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws TException { - iface.getGateway(args.gatewayId,resultHandler); - } - } - - public static class deleteGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteGateway_args, Boolean> { - public deleteGateway() { - super("deleteGateway"); - } - - public deleteGateway_args getEmptyArgsInstance() { - return new deleteGateway_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - deleteGateway_result result = new deleteGateway_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - deleteGateway_result result = new deleteGateway_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, deleteGateway_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.deleteGateway(args.gatewayId,resultHandler); - } - } - - public static class getAllGateways<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllGateways_args, List<org.apache.airavata.model.workspace.Gateway>> { - public getAllGateways() { - super("getAllGateways"); - } - - public getAllGateways_args getEmptyArgsInstance() { - return new getAllGateways_args(); - } - - public AsyncMethodCallback<List<org.apache.airavata.model.workspace.Gateway>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<org.apache.airavata.model.workspace.Gateway>>() { - public void onComplete(List<org.apache.airavata.model.workspace.Gateway> o) { - getAllGateways_result result = new getAllGateways_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getAllGateways_result result = new getAllGateways_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getAllGateways_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.workspace.Gateway>> resultHandler) throws TException { - iface.getAllGateways(resultHandler); - } - } - - public static class isGatewayExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isGatewayExist_args, Boolean> { - public isGatewayExist() { - super("isGatewayExist"); - } - - public isGatewayExist_args getEmptyArgsInstance() { - return new isGatewayExist_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - isGatewayExist_result result = new isGatewayExist_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - isGatewayExist_result result = new isGatewayExist_result(); - if (e instanceof org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) { - result.gatewayProfileException = (org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException) e; - result.setGatewayProfileExceptionIsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, isGatewayExist_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.isGatewayExist(args.gatewayId,resultHandler); - } - } - - } - - public static class getAPIVersion_args implements org.apache.thrift.TBase<getAPIVersion_args, getAPIVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_args"); - - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getAPIVersion_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAPIVersion_argsTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_args.class, metaDataMap); - } - - public getAPIVersion_args() { - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getAPIVersion_args(getAPIVersion_args other) { - } - - public getAPIVersion_args deepCopy() { - return new getAPIVersion_args(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getAPIVersion_args) - return this.equals((getAPIVersion_args)that); - return false; - } - - public boolean equals(getAPIVersion_args that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - return list.hashCode(); - } - - @Override - public int compareTo(getAPIVersion_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getAPIVersion_args("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getAPIVersion_argsStandardSchemeFactory implements SchemeFactory { - public getAPIVersion_argsStandardScheme getScheme() { - return new getAPIVersion_argsStandardScheme(); - } - } - - private static class getAPIVersion_argsStandardScheme extends StandardScheme<getAPIVersion_args> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getAPIVersion_argsTupleSchemeFactory implements SchemeFactory { - public getAPIVersion_argsTupleScheme getScheme() { - return new getAPIVersion_argsTupleScheme(); - } - } - - private static class getAPIVersion_argsTupleScheme extends TupleScheme<getAPIVersion_args> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class getAPIVersion_result implements org.apache.thrift.TBase<getAPIVersion_result, getAPIVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAPIVersion_result> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAPIVersion_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); - private static final org.apache.thrift.protocol.TField GATEWAY_PROFILE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayProfileException", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getAPIVersion_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAPIVersion_resultTupleSchemeFactory()); - } - - public String success; // required - public org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - GATEWAY_PROFILE_EXCEPTION((short)1, "gatewayProfileException"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // GATEWAY_PROFILE_EXCEPTION - return GATEWAY_PROFILE_EXCEPTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GATEWAY_PROFILE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("gatewayProfileException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap); - } - - public getAPIVersion_result() { - } - - public getAPIVersion_result( - String success, - org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) - { - this(); - this.success = success; - this.gatewayProfileException = gatewayProfileException; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public getAPIVersion_result(getAPIVersion_result other) { - if (other.isSetSuccess()) { - this.success = other.success; - } - if (other.isSetGatewayProfileException()) { - this.gatewayProfileException = new org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException(other.gatewayProfileException); - } - } - - public getAPIVersion_result deepCopy() { - return new getAPIVersion_result(this); - } - - @Override - public void clear() { - this.success = null; - this.gatewayProfileException = null; - } - - public String getSuccess() { - return this.success; - } - - public getAPIVersion_result setSuccess(String success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException getGatewayProfileException() { - return this.gatewayProfileException; - } - - public getAPIVersion_result setGatewayProfileException(org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException gatewayProfileException) { - this.gatewayProfileException = gatewayProfileException; - return this; - } - - public void unsetGatewayProfileException() { - this.gatewayProfileException = null; - } - - /** Returns true if field gatewayProfileException is set (has been assigned a value) and false otherwise */ - public boolean isSetGatewayProfileException() { - return this.gatewayProfileException != null; - } - - public void setGatewayProfileExceptionIsSet(boolean value) { - if (!value) { - this.gatewayProfileException = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((String)value); - } - break; - - case GATEWAY_PROFILE_EXCEPTION: - if (value == null) { - unsetGatewayProfileException(); - } else { - setGatewayProfileException((org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case GATEWAY_PROFILE_EXCEPTION: - return getGatewayProfileException(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case GATEWAY_PROFILE_EXCEPTION: - return isSetGatewayProfileException(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getAPIVersion_result) - return this.equals((getAPIVersion_result)that); - return false; - } - - public boolean equals(getAPIVersion_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_gatewayProfileException = true && this.isSetGatewayProfileException(); - boolean that_present_gatewayProfileException = true && that.isSetGatewayProfileException(); - if (this_present_gatewayProfileException || that_present_gatewayProfileException) { - if (!(this_present_gatewayProfileException && that_present_gatewayProfileException)) - return false; - if (!this.gatewayProfileException.equals(that.gatewayProfileException)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - boolean present_gatewayProfileException = true && (isSetGatewayProfileException()); - list.add(present_gatewayProfileException); - if (present_gatewayProfileException) - list.add(gatewayProfileException); - - return list.hashCode(); - } - - @Override - public int compareTo(getAPIVersion_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGatewayProfileException()).compareTo(other.isSetGatewayProfileException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGatewayProfileException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayProfileException, other.gatewayProfileException); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getAPIVersion_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("gatewayProfileException:"); - if (this.gatewayProfileException == null) { - sb.append("null"); - } else { - sb.append(this.gatewayProfileException); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getAPIVersion_resultStandardSchemeFactory implements SchemeFactory { - public getAPIVersion_resultStandardScheme getScheme() { - return new getAPIVersion_resultStandardScheme(); - } - } - - private static class getAPIVersion_resultStandardScheme extends StandardScheme<getAPIVersion_result> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getAPIVersion_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // GATEWAY_PROFILE_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.gatewayProfileException = new org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException(); - struct.gatewayProfileException.read(iprot); - struct.setGatewayProfileExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getAPIVersion_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); - oprot.writeFieldEnd(); - } - if (struct.gatewayProfileException != null) { - oprot.writeFieldBegin(GATEWAY_PROFILE_EXCEPTION_FIELD_DESC); - struct.gatewayProfileException.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getAPIVersion_resultTupleSchemeFactory implements SchemeFactory { - public getAPIVersion_resultTupleScheme getScheme() { - return new getAPIVersion_resultTupleScheme(); - } - } - - private static class getAPIVersion_resultTupleScheme extends TupleScheme<getAPIVersion_result> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetGatewayProfileException()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeString(struct.success); - } - if (struct.isSetGatewayProfileException()) { - struct.gatewayProfileException.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAPIVersion_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.gatewayProfileException = new org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException(); - struct.gatewayProfileException.read(iprot); - struct.setGatewayProfileExceptionIsSet(true); - } - } - } - - } - - public static class addGateway_args implements org.apache.thrift.TBase<addGateway_args, addGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<addGateway_args> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addGateway_args"); - - private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new addGateway_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new addGateway_argsTupleSchemeFactory()); - } - - public org.apache.airavata.model.workspace.Gateway gateway; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - GATEWAY((short)1, "gateway"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // GATEWAY - return GATEWAY; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addGateway_args.class, metaDataMap); - } - - public addGateway_args() { - } - - public addGateway_args( - org.apache.airavata.model.workspace.Gateway gateway) - { - this(); - this.gateway = gateway; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public addGateway_args(addGateway_args other) { - if (other.isSetGateway()) { - this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway); - } - } - - public addGateway_args deepCopy() { - return new addGateway_args(this); - } - - @Override - public void clear() { - this.gateway = null; - } - - public org.apache.airavata.model.workspace.Gateway getGateway() { - return this.gateway; - } - - public addGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) { - this.gateway = gateway; - return this; - } - - public void unsetGateway() { - this.gateway = null; - } - - /** Returns true if field gateway is set (has been assigned a value) and false otherwise */ - public boolean isSetGateway() { - return this.gateway != null; - } - - public void setGatewayIsSet(boolean value) { - if (!value) { - this.gateway = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case GATEWAY: - if (value == null) { - unsetGateway(); - } else { - setGateway((org.apache.airavata.model.workspace.Gateway)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case GATEWAY: - return getGateway(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case GATEWAY: - return isSetGateway(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof addGateway_args) - return this.equals((addGateway_args)that); - return false; - } - - public boolean equals(addGateway_args that) { - if (that == null) - return false; - - boolean this_present_gateway = true && this.isSetGateway(); - boolean that_present_gateway = true && that.isSetGateway(); - if (this_present_gateway || that_present_gateway) { - if (!(this_present_gateway && that_present_gateway)) - return false; - if (!this.gateway.equals(that.gateway)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_gateway = true && (isSetGateway()); - list.add(present_gateway); - if (present_gateway) - list.add(gateway); - - return list.hashCode(); - } - - @Override - public int compareTo(addGateway_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); -
<TRUNCATED>
