Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java rest framework with programmable dispatcher?

I'm searching a java rest framework or JAX-RS implementation that allows me to configure the dispatcher at runtime through an API. In JAX-RS it is only possible to do the configuration with @Path and @HttpMethod annotations or by effectively building your own dispatcher in a sub-resource.

I'm searching for:

dispatcher.addResource("/my/{path}", Resource.class) or
dispatcher.addResource("/2nd/path", resourceHandlerFactory)
like image 993
Thomas Koch Avatar asked Mar 15 '26 13:03

Thomas Koch


2 Answers

Unfortunately there is nothing in JAX-RS for dynamic resource specification as you've found. Apache Wink has another alternative to Restlet called DynamicResource http://incubator.apache.org/wink/1.1/html/5.1%20Registration%20and%20Configuration.html. I'd be quite interested in why you need dynamic resources as I had similar requirement.

like image 147
Aaron Phethean Avatar answered Mar 18 '26 01:03

Aaron Phethean


Try Restlet. It provides runtime dispatch functionality through its Router class. See http://wiki.restlet.org/docs_2.1/13-restlet/27-restlet/326-restlet.html for an example.

like image 29
Shaunak Kashyap Avatar answered Mar 18 '26 03:03

Shaunak Kashyap