Esempio n. 1
0
 /** @return */
 public ServerMetadata getRouteMetadata() {
   ServerMetadata m = new ServerMetadata();
   m.setName(getName());
   m.setPort(getPort());
   m.setDefaultFormat(getDefaultFormat());
   m.addAllSupportedFormats(getResponseProcessors().keySet());
   m.addAllRoutes(routeDeclarations.getMetadata());
   return m;
 }
Esempio n. 2
0
 public RegexRouteBuilder regex(String uriPattern, Object controller) {
   return routeDeclarations.regex(uriPattern, controller, routeDefaults);
 }
Esempio n. 3
0
 public ParameterizedRouteBuilder uri(String uriPattern, Object controller) {
   return routeDeclarations.uri(uriPattern, controller, routeDefaults);
 }
Esempio n. 4
0
 /** @return */
 private RouteResolver createRouteResolver() {
   return new RouteResolver(routeDeclarations.createRouteMapping(routeDefaults));
 }
Esempio n. 5
0
 /**
  * Can be called after routes are defined to augment or get data from all the currently-defined
  * routes.
  *
  * @param callback a Callback implementor.
  */
 public void iterateRouteBuilders(Callback<RouteBuilder> callback) {
   routeDeclarations.iterateRouteBuilders(callback);
 }