users@jersey.java.net

[Jersey] Re: Specifying different sub-resources depending on the Content-Type?

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Wed, 26 Oct 2011 13:46:45 -0700 (PDT)

Gili wrote:
>
>
> Cameron Heavon-Jones wrote:
>>
>> How about this?
>>
>> @Consumes(IPHONE_TYPE)
>> public IPhoneDevice getIphone(String id){
>> return new IphoneDevice(id);
>> }
>>
>> @Consumes(ANDROID_TYPE)
>> public AndroidDevice getAndroid(String id){
>> return new AndroidDevice(id);
>> }
>>
>> Any @Consumes annotation on the sub-resource is not used, as this has
>> already been restricted on the locator.
>>
>> I think i'd prefer using a path name but this would work ok.
>>
>
> Hi Cameron,
>
> This is precisely what I want but currently it does not work. Take a look
> at http://java.net/jira/browse/JERSEY-798
>
> This is currently filed as a feature request but if you're saying this is
> supposed to work (according to the specification) then perhaps it should
> be changed into a bug report...?
>
> Gili
>

Nevermind, I figured it out. See my comment on
http://java.net/jira/browse/JERSEY-798

Gili

--
View this message in context: http://jersey.576304.n2.nabble.com/Specifying-different-sub-resources-depending-on-the-Content-Type-tp6487299p6934187.html
Sent from the Jersey mailing list archive at Nabble.com.