You can use subresource locator. Like this:
@Path("/")
public class RootResource {
@Path("foo")
public Foo getFooImpl() {
// decide which impl. of Foo you want to return
....
return new FooImplX();
}
}
On 9.5.2011 19:51, Chris.Rowland_at_sungard.com wrote:
>
> I just started playing around with Jersey, and I tried to find this in
> the documentation, but I haven’t seen it so far.
>
> I’m curious what the correct way to configure a @Path annotated
> resource is.
>
> Basically I want to inject an implementation of an interface at
> runtime… something like this:
>
> @Path(“/foo”)
>
> Public class Foo {
>
> public void setHandler(IHandler h) {
>