|
From: Kristoffer S. <st...@gm...> - 2014-01-29 20:19:34
|
Hi
Im trying to create a jaxrs client proxy from an interface that looks
roughly like this.
public interface SimpleService {
@GET
@Path("basic")
@Produces("text/plain")
String getBasic();
}
There is a service side implementation which is registered using the
Application.getSingletons().
@Path("/simple")
public class SimpleJaxrs implements SimpleService {
String getBasic() { ... }
}
The problem is that @Path method annotations on the interface is not
inherited to the implementation so method endpoints are never registered.
1) I don't want to put a @Path annotation on the interface because that is
the address to find an implementation. Its an interface so I want to have
any number of implementations, right?
2) I do want to have @Path annotations on interface methods because its
part of the interface contract. Having @Path annotations on the
implementation is redundant because it already implements the interface.
Does this make sense? Is it possible to do?
Cheers,
-Kristoffer
|