Router interface
@glassfishrobot is already working on this.
Since Feb 10, 2018.
- Dominant language
- Java
- Stars
- 400
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
(Email from Guilherme Silveira, [http://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2011-03/message/90](http://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2011-03/message/90) )
7\. The heart of a new request. The semantic model for the HTTP<->Resource layer:
public interface Router {
void add(Route route);
ResourceMethod parse(String uri, HttpMethod method, MutableRequest request)
throws ResourceNotFoundException, MethodNotAllowedException, IllegalStateException;
String urlFor(Class type, Method method, Object... params);
List allRoutes();
}
And a route:
public interface Route {
boolean canHandle(String uri);
EnumSet allowedMethods();
String urlFor(Class type, Method m, Object... params);
boolean canHandle(Class type, Method method);
int getPriority();
String getOriginalUri();
}
#### Affected Versions
[2.0]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.