users@jersey.java.net

[Jersey] Interface as a resource

From: Cem Koc <cemalettin.koc_at_gmail.com>
Date: Tue, 22 Mar 2011 00:22:39 -0700 (PDT)

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.