Creates new Camel routes in route builder.
@param routeBuilder
@return
488891
public CamelRouteActionBuilder create(RouteBuilder routeBuilder) {
		CreateCamelRouteAction camelRouteAction = new CreateCamelRouteAction();

		try {
			if (!routeBuilder.getContext().equals(getCamelContext())) {
				routeBuilder.configureRoutes(getCamelContext());
			} else {
				routeBuilder.configure();
			}

			camelRouteAction.setRoutes(routeBuilder.getRouteCollection().getRoutes());
		} catch (Exception e) {
			throw new CitrusRuntimeException("Failed to configure route definitions with camel context", e);
		}

		camelRouteAction.setCamelContext(getCamelContext());
		action.setDelegate(camelRouteAction);
		return this;
	}
736342
private static void createRoutes() {
        pathHandler = new PathHandler(getRoutingHandler());
        
        Router.getWebSocketRoutes().forEach((WebSocketRoute webSocketRoute) -> 
            pathHandler.addExactPath(webSocketRoute.getUrl(),
                    Handlers.websocket(getInstance(WebSocketHandler.class)
                            .withControllerClass(webSocketRoute.getControllerClass())
                            .withAuthentication(webSocketRoute.hasAuthentication())))
        );
        
        Router.getServerSentEventRoutes().forEach((ServerSentEventRoute serverSentEventRoute) ->
            pathHandler.addExactPath(serverSentEventRoute.getUrl(),
                    Handlers.serverSentEvents(getInstance(ServerSentEventHandler.class)
                            .withAuthentication(serverSentEventRoute.hasAuthentication())))
        );
        
        Router.getPathRoutes().forEach((PathRoute pathRoute) ->
            pathHandler.addPrefixPath(pathRoute.getUrl(),
                    new ResourceHandler(new ClassPathResourceManager(Thread.currentThread().getContextClassLoader(), Default.FILES_FOLDER.toString() + pathRoute.getUrl())))
        );
        
        Config config = getInstance(Config.class);
        if (config.isApplicationAdminEnable()) {
            pathHandler.addPrefixPath("/@admin/assets/", new ResourceHandler(new ClassPathResourceManager(Thread.currentThread().getContextClassLoader(), "templates/@admin/assets/")));            
        }
    }
959531
public static <T extends ContentMeta> TreeBuilder<T> builder() {
        return new TreeBuilder<T>().base(new EmptyTree<T>());
    }
269438
public function onRouteBuildAlter(RouteBuildEvent $event) {
    $collection = $event->getRouteCollection();
    array_walk(static::$disabledRoutes, function ($disabledRouteName) use ($collection) {
      if ($route = $collection->get($disabledRouteName)) {
        $route->setRequirement('_access', 'FALSE');
      }
    });
  }
19249
public  <T extends AppController> RouteBuilder to(Class<T> type) {

        boolean hasControllerSegment = false;
        for (Segment segment : segments) {
            hasControllerSegment = segment.controller;
        }

        if (type != null && hasControllerSegment) {
            throw new IllegalArgumentException("Cannot combine {controller} segment and .to(\"...\") method. Failed route: " + routeConfig);
        }

        this.type = type;
        return this;
    }
859393
public SQLRouteResult route(final List<Object> parameters) {
        if (null == sqlStatement) {
            sqlStatement = shardingRouter.parse(logicSQL, true);
        }
        return masterSlaveRouter.route(shardingRouter.route(logicSQL, parameters, sqlStatement));
    }
349268
public function pattern(string $parameter, string $pattern) : RouteBuilder
    {
        foreach ($this->routes as $route) {
            $route->tokens([
                $parameter => $pattern,
            ]);
        }
        return $this;
    }
689441
function createRouter(modules) {
  debug('Creating a new router. Modules: ' + JSON.stringify(modules, null, 3));

  var router = express();
  router.use(bodyParser.json());

  // Map the requested entity path with the actual serverside entity
  router.use('/isomorphine', methodLoader(modules));

  // Proxy request pipeline
  router.post('/isomorphine/*', getPayload, callEntityMethod, serve);

  return router;
}
1140390
public function createRoutes()
    {
        if( empty( $this->routes ) )
        {
            // Check if route caching is enabled and if APC is available
            $isRouteCacheEnabled = eZINI::instance( 'rest.ini' )->variable( 'CacheSettings', 'RouteApcCache' ) === 'enabled';
            if( $isRouteCacheEnabled && ezcBaseFeatures::hasExtensionSupport( 'apc' ) )
            {
                $this->routes = $this->getCachedRoutes();
            }
            else
            {
                $this->routes = $this->doCreateRoutes();
            }
        }

        return $this->routes;
    }
1257237
@Override
    public Router onCreated(BeanCreatedEvent<Router> event) {
        return new FilteredRouter(event.getBean(), routeVersionFilter);
    }
896582
public function method(string ...$methods) : RouteBuilder
    {
        foreach ($this->routes as $route) {
            $route->allows($methods);
        }
        return $this;
    }
656971
public ProteusApplication addDefaultRoutes(RoutingHandler router)
    {

        if (config.hasPath("health.statusPath")) {
            try {
                final String statusPath = config.getString("health.statusPath");

                router.add(Methods.GET, statusPath, (final HttpServerExchange exchange) ->
                {
                    exchange.getResponseHeaders().add(Headers.CONTENT_TYPE, MediaType.TEXT_PLAIN);
                    exchange.getResponseSender().send("OK");
                });

                this.registeredEndpoints.add(EndpointInfo.builder().withConsumes("*/*").withProduces("text/plain").withPathTemplate(statusPath).withControllerName("Internal").withMethod(Methods.GET).build());

            } catch (Exception e) {
                log.error("Error adding health status route.", e.getMessage());
            }
        }

        if (config.hasPath("application.favicon")) {
            try {

                final ByteBuffer faviconImageBuffer;

                final File faviconFile = new File(config.getString("application.favicon"));

                if (!faviconFile.exists()) {
                    try (final InputStream stream = this.getClass().getResourceAsStream(config.getString("application.favicon"))) {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();

                        byte[] buffer = new byte[4096];
                        int read = 0;
                        while (read != -1) {
                            read = stream.read(buffer);
                            if (read > 0) {
                                baos.write(buffer, 0, read);
                            }
                        }

                        faviconImageBuffer = ByteBuffer.wrap(baos.toByteArray());
                    }

                } else {
                    try (final InputStream stream = Files.newInputStream(Paths.get(config.getString("application.favicon")))) {
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();

                        byte[] buffer = new byte[4096];
                        int read = 0;
                        while (read != -1) {
                            read = stream.read(buffer);
                            if (read > 0) {
                                baos.write(buffer, 0, read);
                            }
                        }

                        faviconImageBuffer = ByteBuffer.wrap(baos.toByteArray());
                    }
                }

                router.add(Methods.GET, "favicon.ico", (final HttpServerExchange exchange) ->
                {
                    exchange.getResponseHeaders().add(Headers.CONTENT_TYPE, io.sinistral.proteus.server.MediaType.IMAGE_X_ICON.toString());
                    exchange.getResponseSender().send(faviconImageBuffer);
                });

            } catch (Exception e) {
                log.error("Error adding favicon route.", e.getMessage());
            }
        }

        return this;
    }
138891
public InvocationRouter<InvocationBaratine> buildRouter(WebApp webApp)
  {
    // find views

    InjectorAmp inject = webApp.inject();

    buildViews(inject);

    ArrayList<RouteMap> mapList = new ArrayList<>();

    ServicesAmp manager = webApp.services();

    ServiceRefAmp serviceRef = manager.newService(new RouteService()).ref();

    while (_routes.size() > 0) {
      ArrayList<RouteWebApp> routes = new ArrayList<>(_routes);
      _routes.clear();

      for (RouteWebApp route : routes) {
        mapList.addAll(route.toMap(inject, serviceRef));
      }
    }

    /*
    for (RouteConfig config : _routeList) {
      RouteBaratine route = config.buildRoute();

      mapList.add(new RouteMap("", route));
    }
    */

    RouteMap []routeArray = new RouteMap[mapList.size()];

    mapList.toArray(routeArray);

    return new InvocationRouterWebApp(webApp, routeArray);
  }
263975
public static Router createRouterFor(ServletContext con) {
        String contextName = EldaRouterRestletSupport.flatContextPath(con.getContextPath());
        List<PrefixAndFilename> pfs = prefixAndFilenames(con, contextName);
        //
        Router result = new DefaultRouter();
        String baseFilePath = ServletUtils.withTrailingSlash(con.getRealPath("/"));
        AuthMap am = AuthMap.loadAuthMap(EldaFileManager.get(), noNamesAndValues);
        ModelLoader modelLoader = new APIModelLoader(baseFilePath);
        addBaseFilepath(baseFilePath);
        //
        SpecManagerImpl sm = new SpecManagerImpl(result, modelLoader);
        SpecManagerFactory.set(sm);
        //
        for (PrefixAndFilename pf : pfs) {
            loadOneConfigFile(result, am, modelLoader, pf.prefixPath, pf.fileName);
        }
        int count = result.countTemplates();
        return count == 0 ? RouterFactory.getDefaultRouter() : result;
    }
566201
public static Builder builder() {
    return new AutoValue_MapboxDirectionsRefresh.Builder()
      .baseUrl(Constants.BASE_API_URL)
      .routeIndex(ZERO)
      .legIndex(ZERO);
  }
1152412
protected RenderBuilder render(){

        String template = Router.getControllerPath(getClass()) + "/" + RequestContext.getRoute().getActionName();
        return super.render(template, values());
    }
1182631
function buildRoute({ serviceBaseUrl, withTenant, withFeed }) {
  let result
  if (withTenant) {
    result = new RouteBuilder().push(`(?:(.+)\\.)?${serviceBaseUrl}`, 'tenant')
  } else {
    result = new RouteBuilder({ base: serviceBaseUrl })
  }
  if (withFeed) {
    result.push('([^/]+)', 'feed')
  }
  return result
}