From celix-dev-return-82-apmail-incubator-celix-dev-archive=incubator.apache.org@incubator.apache.org Fri Sep 9 14:56:33 2011 Return-Path: X-Original-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B4AB8D2F for ; Fri, 9 Sep 2011 14:56:33 +0000 (UTC) Received: (qmail 38643 invoked by uid 500); 9 Sep 2011 14:56:33 -0000 Delivered-To: apmail-incubator-celix-dev-archive@incubator.apache.org Received: (qmail 38607 invoked by uid 500); 9 Sep 2011 14:56:32 -0000 Mailing-List: contact celix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: celix-dev@incubator.apache.org Delivered-To: mailing list celix-dev@incubator.apache.org Received: (qmail 38599 invoked by uid 99); 9 Sep 2011 14:56:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 14:56:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of a.broekhuis@gmail.com designates 209.85.161.182 as permitted sender) Received: from [209.85.161.182] (HELO mail-gx0-f182.google.com) (209.85.161.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 14:56:25 +0000 Received: by gxk28 with SMTP id 28so1299399gxk.27 for ; Fri, 09 Sep 2011 07:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=r1j4XwY4OMhVysO6qLgiWr7A2Vbv6gSb0NEwQwFueCQ=; b=LgCPHyVuk0B6ZKJfhcx4kN7Gh6ubYpDm4VVnwQ8NECqkYxMalF4Vnuy9RL9trTfePx romGckp+QCWkUJqYguIAvW9bWYpxvNoVWiZeN2tG7f+DIgIGVc8d2CYTWvAHRBZpIn/A zf4l0722yLsrOFRWkDTa9oO0FzNggd2LN1nis= MIME-Version: 1.0 Received: by 10.43.132.130 with SMTP id hu2mr1121597icc.352.1315580164773; Fri, 09 Sep 2011 07:56:04 -0700 (PDT) Received: by 10.42.197.2 with HTTP; Fri, 9 Sep 2011 07:56:04 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Sep 2011 16:56:04 +0200 Message-ID: Subject: Re: tracker service customizer From: Alexander Broekhuis To: celix-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=20cf307d047e6516a304ac8360dd X-Virus-Checked: Checked by ClamAV on apache.org --20cf307d047e6516a304ac8360dd Content-Type: text/plain; charset=ISO-8859-1 Hi Frank, > Could you tell me something more about the following > callback functions of the service tracker customizer: > Might I suggest you first take a look at the javadoc [1] and osgi specification [2] if such questions rise? Celix follows this spec as close as possible, and if something seems to be incorrect/unclear or missing, feel free to ask. > > > o void *addingService(void *handle, ...) > > o void addedService(...) > > What is the difference between addingService and addedService? What data > should the function addingService return? > In this case, addingService is explained in the javadoc/spec. The addedService method is an addition made and needed by the Felix DependencyManger. For Celix we have chosen to add this function to the default ServiceTracker. The addedService function is a callback that can be used to be informed if a service has actually been added to the tracker, whereas the addingService is a hook used during the adding. It can be used to intercept the service and eg perform additional filtering. For Celix the adding, modified and removed follow the default OSGi tracker. [1]: http://www.osgi.org/javadoc/r4v43/ [2]: http://www.osgi.org/Specifications/HomePage -- Met vriendelijke groet, Alexander Broekhuis --20cf307d047e6516a304ac8360dd--