Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 912D1200B96 for ; Thu, 6 Oct 2016 12:32:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8FC6F160AE0; Thu, 6 Oct 2016 10:32:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D41DF160AAD for ; Thu, 6 Oct 2016 12:32:23 +0200 (CEST) Received: (qmail 80606 invoked by uid 500); 6 Oct 2016 10:32:18 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 80590 invoked by uid 99); 6 Oct 2016 10:32:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 10:32:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 022B01A0221 for ; Thu, 6 Oct 2016 10:32:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Hq7gabSEXJ7k for ; Thu, 6 Oct 2016 10:32:16 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 84A535F2C4 for ; Thu, 6 Oct 2016 10:32:15 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id 197so51379734wmk.1 for ; Thu, 06 Oct 2016 03:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:mime-version:subject:date:references:to:in-reply-to; bh=T/Zw8bsNp1RbHQWdCkO0uGGe2iiZKk+rMyB4v2L2C/g=; b=eNesRDp4pEcv9m1UBLdkTGvvEHtl6XprLjjBGC+8JtGZe1kMHRjEyBQWMQ0txy/n8G vEyNMaXyuVbBUEykPHw8SetOGjXD6DZzxTEKokwZlNAWIbnQmbYbIkEdZWdzMgKvdUbL vaA02OTXhcmhJ1lZ9lqEjnDRGcXt9200HghE7H/Jh4Zx5BrTyk2KXKP5KmJWMoKojUxp T/oI4i9mnWm2NV1rFLmVPcR36VoXAtJDcF5iU7ox5blgK1pD78WNzrdke+wAXkygvVXS G0CZJx0706l/7TI6sHWoKjWwxWoeo/2mdnM0FdRhAM37+TF+9azzw4mqMTtUQEn0QPiW S5ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to; bh=T/Zw8bsNp1RbHQWdCkO0uGGe2iiZKk+rMyB4v2L2C/g=; b=M9ZJ4y3ZK+MjEiSbSpRjzrGJummFrOB3vA1uGSsk4erZRVOjzcoBK//JrDJK1+ILsQ n8hqGWYV92zC7OavUXf8bocye248W6nt6rH7xmAoe/wAkVOFHaa6E/H+clnknRhhyXB5 E4sfzm8qIYqitXH7x+qw29MqblzK5eLqwltqAk09g8CAj4TpdvQ8zzRE83Ks9pDsAncL s8avpLEgjd/5ksA+zUN3Fl8Yx28rd6/Hn2mF7OG2JWjhpFG3Ko9T1pk0n/A3x9bOIiuF 0beGGUEpSp1zEQruzNmjP+qDOq08OrQltlX1WPBf0iegi3uF7fGj8EoIjVoftk8aW+YP I0OA== X-Gm-Message-State: AA6/9RlVSlLem3zRqu+bak8v3C61gRw3VQdNE553ngqNp4UZ7GEKLEfKMqfq4vdo1phymg== X-Received: by 10.28.174.76 with SMTP id x73mr13732772wme.60.1475749935056; Thu, 06 Oct 2016 03:32:15 -0700 (PDT) Received: from [10.6.0.75] ([37.205.61.203]) by smtp.gmail.com with ESMTPSA id t138sm34319965wmt.5.2016.10.06.03.32.14 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Oct 2016 03:32:14 -0700 (PDT) From: Clement Escoffier Content-Type: multipart/alternative; boundary="Apple-Mail=_ED5D5A0B-78B2-4B16-8975-3174A0C47E64" Message-Id: <316C8677-5F41-40C4-B8D1-B7602B799097@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Using service interceptors to inject proxies Date: Thu, 6 Oct 2016 11:32:13 +0100 References: To: Apache Felix - Users Mailing List In-Reply-To: X-Mailer: Apple Mail (2.3124) archived-at: Thu, 06 Oct 2016 10:32:24 -0000 --Apple-Mail=_ED5D5A0B-78B2-4B16-8975-3174A0C47E64 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, The service binding interceptor requires to have a =E2=80=9Cservice=E2=80=9D= available. You should be able to do what you want by either: - combining a =E2=80=9Cdefault-implementation=E2=80=9D strategy and a = binding interceptor (it would require to have the dependency marked as = optional) - or create your own handler that inject what you want to inject = (http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apac= he-felix-ipojo-devguide/how-to-write-your-own-handler.html = ) Clement > On 6 oct. 2016, at 04:02, Martin Nielsen wrote: >=20 > Hello everyone >=20 > I am looking at the felix servicebinding interceptors with a certain = amount > of enthusiasm, but i am having trouble figuring out if they can solve = a > specific task. >=20 > = http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apach= e-felix-ipojo-userguide/ipojo-advanced-topics/service-binding-interceptors= .html >=20 > What i would like to do is the following: Whenever a ServiceReference = is > requested for an interface (No matter which one), i want an = interceptor to > examine it. If the interface meets some criteria, the an interceptor = should > create a proxy for that interface, regardless of a matching = implementation > being registered. > So: Even if no object is actually registered as a service to that > interface, i want the interceptor to return a proxy anyway. Is that > possible to do in any way? >=20 > Thank you in advance. >=20 > -Martin --Apple-Mail=_ED5D5A0B-78B2-4B16-8975-3174A0C47E64--