本文整理汇总了Java中org.restlet.util.RouteList类的典型用法代码示例。如果您正苦于以下问题:Java RouteList类的具体用法?Java RouteList怎么用?Java RouteList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RouteList类属于org.restlet.util包,在下文中一共展示了RouteList类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Router
import org.restlet.util.RouteList; //导入依赖的package包/类
/**
* Constructor.
*
* @param context
* The context.
*/
public Router(Context context) {
super(context);
this.routes = new RouteList();
this.defaultMatchingMode = Template.MODE_EQUALS;
this.defaultMatchingQuery = false;
this.defaultRoute = null;
this.routingMode = MODE_FIRST_MATCH;
this.requiredScore = 0.5F;
this.maxAttempts = 1;
this.retryDelay = 500L;
}
示例2: describeRoutes
import org.restlet.util.RouteList; //导入依赖的package包/类
private void describeRoutes(StringBuilder b, Router router, String path) {
RouteList routes = router.getRoutes();
b.append("[").append(path).append("] = Router: ").append(router.getName()).append(": ").append(router.getDescription()).append("\n");
for (Route r : routes) {
if (r instanceof TemplateRoute) {
describe(b, r.getNext(), path + ((TemplateRoute)r).getTemplate().getPattern());
}
}
}
示例3: getRoutes
import org.restlet.util.RouteList; //导入依赖的package包/类
/**
* Returns the modifiable list of routes. Creates a new instance if no one
* has been set.
*
* @return The modifiable list of routes.
*/
public RouteList getRoutes() {
return this.routes;
}
示例4: setRoutes
import org.restlet.util.RouteList; //导入依赖的package包/类
/**
* Sets the modifiable list of routes.
*
* @param routes
* The modifiable list of routes.
*/
public void setRoutes(RouteList routes) {
this.routes = routes;
}