Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[microprofile-dev] Microprofile rest client subresource provider registration

Hi,

is it possible to register providers on the subresouce client proxy? Does it take precedence over provider registration on the parent level?

 

I would like to register different Providers on different sub-resources. Is it expected? I can't find any information in the MP specification.

 

My resource proxy

 

@Path("/foo")

@RegisterProvider(XYZWriter.class)

@RegisterProvider(XYZReader.class)

public interface Foo {

    @POST

    @Consumes("xyz")

    @Produces("xyz")

    FooResponse get(FooContent content);

 

    @Path("/bar")

    Bar getBar();

}

 

My sub resource proxy

 

@RegisterProvider(ABCReader.class)

public interface Bar {

     @POST

     @Produces("abc")

     BarResponse get();

}

 

My call foo.getBar().get();

 

Thanks.

 

Milan


Back to the top