Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 980D710AE1 for ; Mon, 15 Jul 2013 04:30:28 +0000 (UTC) Received: (qmail 52192 invoked by uid 500); 15 Jul 2013 04:30:25 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 52121 invoked by uid 500); 15 Jul 2013 04:30:18 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 52107 invoked by uid 99); 15 Jul 2013 04:30:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 04:30:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Chiradeep.Vittal@citrix.com designates 66.165.176.63 as permitted sender) Received: from [66.165.176.63] (HELO SMTP02.CITRIX.COM) (66.165.176.63) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jul 2013 04:30:11 +0000 X-IronPort-AV: E=Sophos;i="4.89,666,1367971200"; d="scan'208";a="35136756" Received: from sjcpex01cl01.citrite.net ([10.216.14.143]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/AES128-SHA; 15 Jul 2013 04:29:50 +0000 Received: from SJCPEX01CL02.citrite.net ([169.254.2.91]) by SJCPEX01CL01.citrite.net ([10.216.14.143]) with mapi id 14.02.0342.004; Sun, 14 Jul 2013 21:29:49 -0700 From: Chiradeep Vittal To: "dev@cloudstack.apache.org" Subject: Re: Invoking an API from an API plugin Thread-Topic: Invoking an API from an API plugin Thread-Index: AQHOfnKCDfvffbNw00Kgpq2GQGkanplgXeyAgAWelQA= Date: Mon, 15 Jul 2013 04:29:49 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.5.130515 x-originating-ip: [10.216.48.12] Content-Type: text/plain; charset="us-ascii" Content-ID: <6A1EDBC055F29B4B82F185662B7A61FE@citrix.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org APIs should call the service interface directly and not call other APIs. On 7/12/13 1:40 AM, "SuichII, Christopher" wrote: >Er, I should have mentioned that it is not as easy as simply invoking one >API command from another since all the CS API commands have private >@paramenter members. Because of this, I cannot simply instantiate a >command, populate it with the parameters and call execute() on it. > >-Chris > >On Jul 11, 2013, at 4:09 PM, Chris Suich > wrote: > >> I'm writing an API plugin that needs to consume an API that already >>exists in CS. The only way I can find to do this would be to send the >>REST/HTTP request from my plugin, but I'm hoping there is an easier way. >>Since both plugins are on the same Java classpath they have the ability >>to invoke each other. >>=20 >> Is there a simple way to do this that I'm missing? >>=20 >> -Chris >