users@jersey.java.net

[Jersey] Re: Interface as a resource

From: Ryan Stewart <rds6235_at_gmail.com>
Date: Tue, 22 Mar 2011 11:07:32 -0500

What help do you need? That already works (annotating interfaces instead of
classes).

On Tue, Mar 22, 2011 at 2:22 AM, Cem Koc <cemalettin.koc_at_gmail.com> wrote:

> Hi,
>
> What I wanted to make is using our resources like this:
>
>
> public class DemoResource implements Test{
> public String hello() {
> return "Hello world";
> }
> }
>
> @Path("hello")
> interface Test{
> @GET
> @Path("world")
> public String hello();
> }
>
> I know that resources are unique and interface are violating this rule.
> However for my case it is essential because each interface is implemented
> by
> a unique class. If I can provide this abstraction, I will try to implement
> a
> proxy class which is utilizing this interface. As a result of this, we will
> have a chance to get rid of ugly clients codes.
>
> Any help?
>
> --
> View this message in context:
> http://jersey.576304.n2.nabble.com/Interface-as-a-resource-tp6195227p6195227.html
> Sent from the Jersey mailing list archive at Nabble.com.
>