/** * Start a server on the specified host and port, using the provided settings and [[ActorSystem]]. * Note that this method is blocking. * * @param system ActorSystem to use for starting the app, * if null is passed in a new default ActorSystem will be created instead, which will * be terminated when the server is stopped. */ public void startServer(String host, int port, ServerSettings settings, ActorSystem system) throws ExecutionException, InterruptedException { startServer(host, port, settings, Optional.ofNullable(system)); }
.bindAndHandle(routes().flow(theSystem, materializer), ConnectHttp.toHost(host, port), settings, postHttpBindingFailure(exception); } else { postHttpBinding(binding); .thenCompose(ignore -> waitForShutdownSignal(theSystem)) // chaining both futures to fail fast .toCompletableFuture() postServerShutdown(Optional.ofNullable(exception), theSystem); if (!system.isPresent()) {
.bindAndHandle(routes().flow(theSystem, materializer), ConnectHttp.toHost(host, port), settings, postHttpBindingFailure(exception); } else { postHttpBinding(binding); .thenCompose(ignore -> waitForShutdownSignal(theSystem)) // chaining both futures to fail fast .toCompletableFuture() postServerShutdown(Optional.ofNullable(exception), theSystem); if (!system.isPresent()) {
.bindAndHandle(routes().flow(theSystem, materializer), ConnectHttp.toHost(host, port), settings, postHttpBindingFailure(exception); } else { postHttpBinding(binding); .thenCompose(ignore -> waitForShutdownSignal(theSystem)) // chaining both futures to fail fast .toCompletableFuture() postServerShutdown(Optional.ofNullable(exception), theSystem); if (!system.isPresent()) {
/** * Start a server on the specified host and port, using the provided settings and [[ActorSystem]]. * Note that this method is blocking. * * @param system ActorSystem to use for starting the app, * if null is passed in a new default ActorSystem will be created instead, which will * be terminated when the server is stopped. */ public void startServer(String host, int port, ServerSettings settings, ActorSystem system) throws ExecutionException, InterruptedException { startServer(host, port, settings, Optional.ofNullable(system)); }
/** * Start a server on the specified host and port, using the provided settings and [[ActorSystem]]. * Note that this method is blocking. * * @param system ActorSystem to use for starting the app, * if null is passed in a new default ActorSystem will be created instead, which will * be terminated when the server is stopped. */ public void startServer(String host, int port, ServerSettings settings, ActorSystem system) throws ExecutionException, InterruptedException { startServer(host, port, settings, Optional.ofNullable(system)); }
/** * Start a server on the specified host and port, using the provided settings. * Note that this method is blocking. */ public void startServer(String host, int port, ServerSettings settings) throws ExecutionException, InterruptedException { startServer(host, port, settings, Optional.empty()); }
/** * Start a server on the specified host and port, using the provided settings. * Note that this method is blocking. */ public void startServer(String host, int port, ServerSettings settings) throws ExecutionException, InterruptedException { startServer(host, port, settings, Optional.empty()); }
/** * Start a server on the specified host and port, using the provided settings. * Note that this method is blocking. */ public void startServer(String host, int port, ServerSettings settings) throws ExecutionException, InterruptedException { startServer(host, port, settings, Optional.empty()); }
/** * Start a server on the specified host and port, using the provided [[ActorSystem]] * Note that this method is blocking. * * @param system ActorSystem to use for starting the app, * if null is passed in a new default ActorSystem will be created instead, which will * be terminated when the server is stopped. */ public void startServer(String host, int port, ActorSystem system) throws ExecutionException, InterruptedException { startServer(host, port, ServerSettings.create(system), Optional.ofNullable(system)); }
/** * Start a server on the specified host and port. * Note that this method is blocking. */ public void startServer(String host, int port) throws ExecutionException, InterruptedException { startServer(host, port, ServerSettings.create(ConfigFactory.load())); }
/** * Start a server on the specified host and port. * Note that this method is blocking. */ public void startServer(String host, int port) throws ExecutionException, InterruptedException { startServer(host, port, ServerSettings.create(ConfigFactory.load())); }
/** * Start a server on the specified host and port, using the provided [[ActorSystem]] * Note that this method is blocking. * * @param system ActorSystem to use for starting the app, * if null is passed in a new default ActorSystem will be created instead, which will * be terminated when the server is stopped. */ public void startServer(String host, int port, ActorSystem system) throws ExecutionException, InterruptedException { startServer(host, port, ServerSettings.create(system), Optional.ofNullable(system)); }
/** * Start a server on the specified host and port. * Note that this method is blocking. */ public void startServer(String host, int port) throws ExecutionException, InterruptedException { startServer(host, port, ServerSettings.create(ConfigFactory.load())); }
/** * Start a server on the specified host and port, using the provided [[ActorSystem]] * Note that this method is blocking. * * @param system ActorSystem to use for starting the app, * if null is passed in a new default ActorSystem will be created instead, which will * be terminated when the server is stopped. */ public void startServer(String host, int port, ActorSystem system) throws ExecutionException, InterruptedException { startServer(host, port, ServerSettings.create(system), Optional.ofNullable(system)); }