Class HttpApp

    • Constructor Detail

      • HttpApp

        public HttpApp()
        Deprecated.
    • Method Detail

      • Segments

        public PathMatcher<scala.Tuple1<scala.collection.immutable.List<java.lang.String>>> Segments()
        Deprecated.
        Specified by:
        Segments in interface PathMatchers
      • binding

        public scala.util.Try<Http.ServerBinding> binding()
        Deprecated.
        It tries to retrieve the ServerBinding if the server has been successfully started. It fails otherwise. You can use this method to attempt to retrieve the ServerBinding at any point in time to, for example, stop the server due to unexpected circumstances.
        Returns:
        (undocumented)
      • postHttpBinding

        protected void postHttpBinding​(Http.ServerBinding binding)
        Deprecated.
        Hook that will be called just after the Http server binding is done. Override this method if you want to perform some actions after the server is up.
        Parameters:
        binding - (undocumented)
      • postHttpBindingFailure

        protected void postHttpBindingFailure​(java.lang.Throwable cause)
        Deprecated.
        Hook that will be called in case the Http server binding fails. Override this method if you want to perform some actions after the server binding failed.
        Parameters:
        cause - (undocumented)
      • postServerShutdown

        protected void postServerShutdown​(scala.util.Try<akka.Done> attempt,
                                          akka.actor.ActorSystem system)
        Deprecated.
        Hook that will be called just after the server termination. Override this method if you want to perform some cleanup actions after the server is stopped. The attempt parameter is represented with a Try type that is successful only if the server was successfully shut down.
        Parameters:
        attempt - (undocumented)
        system - (undocumented)
      • routes

        protected abstract scala.Function1<RequestContext,​scala.concurrent.Future<RouteResult>> routes()
        Deprecated.
        Override to implement the routes that will be served by this http server.
        Returns:
        (undocumented)
      • startServer

        public void startServer​(java.lang.String host,
                                int port)
        Deprecated.
        Start a server on the specified host and port. Note that this method is blocking
        Parameters:
        host - (undocumented)
        port - (undocumented)
      • startServer

        public void startServer​(java.lang.String host,
                                int port,
                                akka.actor.ActorSystem system)
        Deprecated.
        Start a server on the specified host and port, using the provided ActorSystem. Note that this method is blocking

        Parameters:
        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.
        host - (undocumented)
        port - (undocumented)
      • startServer

        public void startServer​(java.lang.String host,
                                int port,
                                ServerSettings settings)
        Deprecated.
        Start a server on the specified host and port, using the provided settings. Note that this method is blocking.
        Parameters:
        host - (undocumented)
        port - (undocumented)
        settings - (undocumented)
      • startServer

        public void startServer​(java.lang.String host,
                                int port,
                                ServerSettings settings,
                                akka.actor.ActorSystem system)
        Deprecated.
        Start a server on the specified host and port, using the provided settings and ActorSystem. Note that this method is blocking.

        Parameters:
        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.
        host - (undocumented)
        port - (undocumented)
        settings - (undocumented)
      • startServer

        public void startServer​(java.lang.String host,
                                int port,
                                ServerSettings settings,
                                scala.Option<akka.actor.ActorSystem> system)
        Deprecated.
        Start a server on the specified host and port, using the provided settings and ActorSystem if present. Note that this method is blocking.

        Parameters:
        system - ActorSystem to use for starting the app, if None is passed in a new default ActorSystem will be created instead, which will be terminated when the server is stopped.
        host - (undocumented)
        port - (undocumented)
        settings - (undocumented)
      • systemReference

        protected java.util.concurrent.atomic.AtomicReference<akka.actor.ActorSystem> systemReference()
        Deprecated.
        ActorSystem used to start this server. Stopping this system will interfere with the proper functioning condition of the server.
        Returns:
        (undocumented)
      • waitForShutdownSignal

        protected scala.concurrent.Future<akka.Done> waitForShutdownSignal​(akka.actor.ActorSystem system,
                                                                           scala.concurrent.ExecutionContext ec)
        Deprecated.
        Hook that lets the user specify the future that will signal the shutdown of the server whenever completed.
        Parameters:
        system - (undocumented)
        ec - (undocumented)
        Returns:
        (undocumented)