/** * Create a server for the router returned by the given block. * * @param block The block which creates a router. * @param mode The mode the server will run on. * @param port The port the server will run on. * * @return The running server. */ public static Server forRouter(Mode mode, int port, Function<BuiltInComponents, Router> block) { return new Builder() .mode(mode) .http(port) .build(block); }
/** * Create a server for the router returned by the given block. * * @param block The block which creates a router. * @param mode The mode the server will run on. * @param port The port the server will run on. * * @return The running server. */ public static Server forRouter(Mode mode, int port, Function<BuiltInComponents, Router> block) { return new Builder() .mode(mode) .http(port) .build(block); }