Package

play.core

server

Permalink

package server

Visibility
  1. Public
  2. All

Type Members

  1. class AkkaHttpServer extends Server

    Permalink

    Starts a Play server using Akka HTTP.

  2. trait AkkaHttpServerComponents extends ServerComponents

    Permalink

    Components for building a simple Akka HTTP Server.

  3. class AkkaHttpServerProvider extends ServerProvider

    Permalink

    Knows how to create an AkkaHttpServer.

  4. trait DefaultAkkaHttpServerComponents extends AkkaHttpServerComponents with api.BuiltInComponents with NoHttpFiltersComponents

    Permalink

    A convenient helper trait for constructing an AkkaHttpServer, for example:

    A convenient helper trait for constructing an AkkaHttpServer, for example:

    val components = new DefaultAkkaHttpServerComponents {
      override lazy val router = {
        case GET(p"/") => Action(parse.json) { body =>
          Ok("Hello")
        }
      }
    }
    val server = components.server
  5. trait DefaultNettyServerComponents extends NettyServerComponents with api.BuiltInComponents with NoHttpFiltersComponents

    Permalink

    A convenient helper trait for constructing an NettyServer, for example:

    A convenient helper trait for constructing an NettyServer, for example:

    val components = new DefaultNettyServerComponents {
      override lazy val router = {
        case GET(p"/") => Action(parse.json) { body =>
          Ok("Hello")
        }
      }
    }
    val server = components.server
  6. class NettyServer extends Server

    Permalink

    creates a Server implementation based Netty

  7. trait NettyServerComponents extends ServerComponents

    Permalink

    Cake for building a simple Netty server.

  8. class NettyServerProvider extends ServerProvider

    Permalink

    The Netty server provider

  9. sealed trait NettyTransport extends AnyRef

    Permalink
  10. class RealServerProcess extends ServerProcess

    Permalink

    A ServerProcess that wraps a real JVM process.

    A ServerProcess that wraps a real JVM process. Calls have a real effect on the JVM, e.g. exit calls System.exit.

  11. final class SelfSignedSSLEngineProvider extends SSLEngineProvider

    Permalink

    An SSLEngineProvider which simply references the values in the SelfSigned object.

    An SSLEngineProvider which simply references the values in the SelfSigned object.

    Annotations
    @ApiMayChange()
  12. trait Server extends ReloadableServer

    Permalink

    Provides generic server behaviour for Play applications.

  13. trait ServerComponents extends AnyRef

    Permalink

    Components to create a Server instance.

  14. case class ServerConfig(rootDir: File, port: Option[Int], sslPort: Option[Int], address: String, mode: api.Mode, properties: Properties, configuration: Configuration) extends Product with Serializable

    Permalink

    Common configuration for servers such as NettyServer.

    Common configuration for servers such as NettyServer.

    rootDir

    The root directory of the server. Used to find default locations of files, log directories, etc.

    port

    The HTTP port to use.

    sslPort

    The HTTPS port to use.

    address

    The socket address to bind to.

    mode

    The run mode: dev, test or prod.

  15. final case class ServerEndpoint(description: String, scheme: String, host: String, port: Int, expectedHttpVersions: Set[String], expectedServerAttr: Option[String], ssl: Option[ClientSsl]) extends Product with Serializable

    Permalink

    Contains information about which port and protocol can be used to connect to the server.

    Contains information about which port and protocol can be used to connect to the server. This class is used to abstract out the details of connecting to different backends and protocols. Most tests will operate the same no matter which endpoint they are connected to.

    Annotations
    @ApiMayChange()
  16. final case class ServerEndpoints(endpoints: Seq[ServerEndpoint]) extends Product with Serializable

    Permalink

    Wrapper for a sequence of ServerEndpoints.

    Wrapper for a sequence of ServerEndpoints. Has a few convenience methods. Also can be used as an implicit parameter to pass around server endpoint information.

    Annotations
    @ApiMayChange()
  17. class ServerListenException extends Exception

    Permalink

    This exception is thrown when the server is unable to listen on a port

  18. trait ServerProcess extends AnyRef

    Permalink

    Abstracts a JVM process so it can be mocked for testing or to isolate pseudo-processes within a VM.

    Abstracts a JVM process so it can be mocked for testing or to isolate pseudo-processes within a VM. Code using this class should use the methods in this class instead of methods like System.getProperties(), System.exit(), etc.

  19. trait ServerProvider extends AnyRef

    Permalink

    An object that knows how to obtain a server.

    An object that knows how to obtain a server. Instantiating a ServerProvider object should be fast and side-effect free. Any actual work that a ServerProvider needs to do should be delayed until the createServer method is called.

  20. final case class ServerStartException(message: String, cause: Option[Throwable] = None) extends Exception with Product with Serializable

    Permalink

    Indicates an issue with starting a server, e.g.

    Indicates an issue with starting a server, e.g. a problem reading its configuration.

  21. trait WebSocketable extends AnyRef

    Permalink

Value Members

  1. object AkkaHttpServer extends ServerFromRouter

    Permalink

    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.

  2. object DevServerStart

    Permalink

    Used to start servers in 'dev' mode, a mode where the application is reloaded whenever its source changes.

  3. object Jdk extends NettyTransport with Product with Serializable

    Permalink
  4. object Native extends NettyTransport with Product with Serializable

    Permalink
  5. object NettyServer extends ServerFromRouter

    Permalink

    Create a Netty server zfrom a given router using BuiltInComponents:

    Create a Netty server zfrom a given router using BuiltInComponents:

    val server = NettyServer.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.

  6. object ProdServerStart

    Permalink

    Used to start servers in 'prod' mode, the mode that is used in production.

    Used to start servers in 'prod' mode, the mode that is used in production. The application is loaded and started immediately.

  7. object SelfSigned

    Permalink

    Contains a statically initialized self-signed certificate.

    Contains a statically initialized self-signed certificate.

    Annotations
    @ApiMayChange()
  8. object Server

    Permalink

    Utilities for creating a server that runs around a block of code.

  9. object ServerConfig extends Serializable

    Permalink
  10. object ServerEndpoint extends Serializable

    Permalink
    Annotations
    @ApiMayChange()
  11. object ServerProvider

    Permalink
  12. package akkahttp

    Permalink
  13. package common

    Permalink
  14. package netty

    Permalink
  15. package ssl

    Permalink

Ungrouped