package server
- Alphabetic
- Public
- Protected
Type Members
- final class DevServerStart extends AnyRef
- Annotations
- @InternalApi()
- class RealServerProcess extends ServerProcess
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.
exitcallsSystem.exit. - final class SelfSignedSSLEngineProvider extends SSLEngineProvider
An SSLEngineProvider which simply references the values in the SelfSigned object.
An SSLEngineProvider which simply references the values in the SelfSigned object.
- Annotations
- @ApiMayChange()
- trait Server extends ReloadableServer
Provides generic server behaviour for Play applications.
- trait ServerComponents extends AnyRef
Components to create a Server instance.
- case class ServerConfig(rootDir: File, port: Option[Int], sslPort: Option[Int], address: String, mode: api.Mode, properties: Properties, configuration: Configuration) extends Product with Serializable
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.
- configuration
The configuration to use for loading the server. This is not the same as application configuration. This configuration is usually loaded from a server.conf file, whereas the application configuration is usually loaded from an application.conf file.
- final case class ServerEndpoint(description: String, scheme: String, host: String, port: Int, protocols: Set[String], serverAttribute: Option[String], ssl: Option[SSLContext]) extends Product with Serializable
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()
- final case class ServerEndpoints(endpoints: Seq[ServerEndpoint]) extends Product with Serializable
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()
- class ServerListenException extends Exception
This exception is thrown when the server is unable to listen on a port
- trait ServerProcess extends AnyRef
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. - trait ServerProvider extends AnyRef
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
createServermethod is called. - final case class ServerStartException(message: String, cause: Option[Throwable] = None) extends Exception with Product with Serializable
Indicates an issue with starting a server, e.g.
Indicates an issue with starting a server, e.g. a problem reading its configuration.
- trait WebSocketable extends AnyRef
Value Members
- object DevServerStart
Used to start servers in 'dev' mode, a mode where the application is reloaded whenever its source changes.
- object ProdServerStart
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.
- object SelfSigned
Contains a statically initialized self-signed certificate.
Contains a statically initialized self-signed certificate.
- Annotations
- @ApiMayChange()
- object Server
Utilities for creating a server that runs around a block of code.
- object ServerConfig extends Serializable
- object ServerEndpoints extends Serializable
- Annotations
- @ApiMayChange()
- object ServerProvider