Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 69547 invoked from network); 14 Sep 2010 15:15:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Sep 2010 15:15:49 -0000 Received: (qmail 50480 invoked by uid 500); 14 Sep 2010 15:15:49 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 50282 invoked by uid 500); 14 Sep 2010 15:15:46 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 50268 invoked by uid 99); 14 Sep 2010 15:15:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Sep 2010 15:15:45 +0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-qy0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Sep 2010 15:15:41 +0000 Received: by qyk31 with SMTP id 31so6866157qyk.11 for ; Tue, 14 Sep 2010 08:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=0Qm28JQyshAspDqsYdyJ3Etghgrkuhm0dzxaLVUjsKU=; b=rGkkv45Afqj+yRvr1L/WO4Qyr9hhG94TbW2QICvB3D06VzPbd1ALYzJPJjX494A4gJ mX6uDV73TddkN4ul1Mx4aHmRg0lHA53e6jwLmwMHSBtO/Jh6Bb/nDZW1J5ZdxYVe+NF+ 7w1Qk30iT9cBfijZ5/tODhdbkrW/ldhC9pFlI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=U90V6Nk2TTu+u7V9lKzG4MV6Y/DJNfmRpyiWa4+wEabDztI2prhgiKZ6Vudw164h6V htXlYE/Ssqp5MXW6j0V91V/VEK3IGG8CTodP7qgegB7jI8tSZIboQhJasU0oFytjufD0 5sEclCJv2i53z/fgqO8j7KN2l6VtuXV3eLlgw= Received: by 10.224.28.77 with SMTP id l13mr1432qac.375.1284477320472; Tue, 14 Sep 2010 08:15:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.51.229 with HTTP; Tue, 14 Sep 2010 08:14:57 -0700 (PDT) In-Reply-To: <1284476322163-2839250.post@n5.nabble.com> References: <1284476322163-2839250.post@n5.nabble.com> From: Claus Ibsen Date: Tue, 14 Sep 2010 17:14:57 +0200 Message-ID: Subject: Re: [Converter] Generics ? To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Sep 14, 2010 at 4:58 PM, Olivier.Roger wrot= e: > > hello Camel! > > Is it possible to use generics in annotated converters ? > > I tried to do this > > =A0 =A0@Converter > =A0 =A0public T toPayload(Message msg){ > =A0 =A0 =A0 =A0return msg.getPayload(); > =A0 =A0} > > Which does not work. However, replacing by a real class definition is > working for that type. > I would like to avoid to create one converter for each type of payload my > messages can have, is that possible ? > Use the @FallbackConverter http://camel.apache.org/type-converter.html > Thanks in advance, > > Olivier > -- > View this message in context: http://camel.465427.n5.nabble.com/Converter= -Generics-tp2839250p2839250.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus