Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package core
    Definition Classes
    play
  • package server
    Definition Classes
    core
  • object AkkaHttpServer extends ServerFromRouter

    Creates an AkkaHttpServer from a given router using BuiltInComponents:

    Creates an AkkaHttpServer from a given router using BuiltInComponents:

    val server = AkkaHttpServer.fromRouterWithComponents(ServerConfig(port = Some(9002))) { components =>
      import play.api.mvc.Results._
      import components.{ defaultActionBuilder => Action }
      {
        case GET(p"/") => Action {
          Ok("Hello")
        }
      }
    }

    Use this together with Sird Router.

    Definition Classes
    server
  • Context

final case class Context(config: ServerConfig, appProvider: ApplicationProvider, actorSystem: ActorSystem, materializer: Materializer, stopHook: () => Future[_]) extends Product with Serializable

The values needed to initialize an AkkaHttpServer.

config

Basic server configuration values.

appProvider

An object which can be queried to get an Application.

actorSystem

An ActorSystem that the server can use.

stopHook

A function that should be called by the server when it stops. This function can be used to close resources that are provided to the server.

Source
AkkaHttpServer.scala
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Context
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Context(config: ServerConfig, appProvider: ApplicationProvider, actorSystem: ActorSystem, materializer: Materializer, stopHook: () => Future[_])

    config

    Basic server configuration values.

    appProvider

    An object which can be queried to get an Application.

    actorSystem

    An ActorSystem that the server can use.

    stopHook

    A function that should be called by the server when it stops. This function can be used to close resources that are provided to the server.

Value Members

  1. val actorSystem: ActorSystem
  2. val appProvider: ApplicationProvider
  3. val config: ServerConfig
  4. val materializer: Materializer
  5. def productElementNames: Iterator[String]
    Definition Classes
    Product
  6. val stopHook: () => Future[_]