/** * Create a server for the given router. * <p> * The server will be running in TEST mode. * * @param router The router for the server to serve. * @param port The port the server will run on. * @return The running server. */ public static Server forRouter(Router router, int port) { return forRouter(router, Mode.TEST, port); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * * @param router The router for the server to serve. * @param mode The mode the server will run on. * @return The running server. */ public static Server forRouter(Router router, Mode mode) { return forRouter(router, mode, 0); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param mode The mode the server will run on. * @param block The block that creates the router. * @return The running server. */ public static Server forRouter(Mode mode, Function<BuiltInComponents, Router> block) { return forRouter(mode, 0, block); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param block The block that creates the router. * @return The running server. */ public static Server forRouter(Function<BuiltInComponents, Router> block) { return forRouter(Mode.TEST, 0, block); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param router The router for the server to serve. * @return The running server. */ public static Server forRouter(Router router) { return forRouter(router, Mode.TEST, 0); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param block The block that creates the router. * @return The running server. */ public static Server forRouter(Function<BuiltInComponents, Router> block) { return forRouter(Mode.TEST, 0, block); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param mode The mode the server will run on. * @param block The block that creates the router. * @return The running server. */ public static Server forRouter(Mode mode, Function<BuiltInComponents, Router> block) { return forRouter(mode, 0, block); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param port The port the server will run on. * @param block The block that creates the router. * @return The running server. */ public static Server forRouter(int port, Function<BuiltInComponents, Router> block) { return forRouter(Mode.TEST, port, block); }
/** * Create a server for the given router. * <p> * The server will be running on a randomly selected ephemeral port, which can be checked using the httpPort * property. * <p> * The server will be running in TEST mode. * * @param port The port the server will run on. * @param block The block that creates the router. * @return The running server. */ public static Server forRouter(int port, Function<BuiltInComponents, Router> block) { return forRouter(Mode.TEST, port, block); }
server = Server.forRouter(router, Mode.DEV, port); this.port = port;
server = Server.forRouter(router, Mode.DEV, port); this.port = port;
server = Server.forRouter(router, Mode.DEV, port); this.port = port;
server = Server.forRouter(routingDsl.build(), Mode.DEV, port);
server = Server.forRouter(routingDsl.build(), Mode.DEV, port);
Server server = Server.forRouter(dsl.build(), statusServerPort);
Server server = Server.forRouter(dsl.build(), statusServerPort);
Server server = Server.forRouter(dsl.build(), statusServerPort);