automorph.transport.http.server.JettyServer
See theJettyServer companion object
final case class JettyServer[Effect[_]](effectSystem: EffectSystem[Effect], port: Int, pathPrefix: String, methods: Iterable[HttpMethod], webSocket: Boolean, mapException: Throwable => Int, threadPool: ThreadPool, idleTimeout: FiniteDuration, maxFrameSize: Long, attributes: Map[String, String], handler: RequestHandler[Effect, Context]) extends ServerTransport[Effect, Context]
Jetty HTTP & WebSocket server message transport plugin.
Interprets HTTP request body as an RPC request and processes it using the specified RPC request handler.
- The response returned by the RPC request handler is used as HTTP response body.
- Processes only HTTP requests starting with specified URL path.
Type parameters
- Effect
-
effect type
Value parameters
- attributes
-
server attributes
- effectSystem
-
effect system plugin
- handler
-
RPC request handler
- idleTimeout
-
idle WebSocket connection timeout
- mapException
-
maps an exception to a corresponding HTTP status code
- maxFrameSize
-
maximum WebSocket frame size
- methods
-
allowed HTTP request methods
- pathPrefix
-
HTTP URL path prefix, only requests starting with this path prefix are allowed
- port
-
port to listen on for HTTP connections
- threadPool
-
thread pool
- webSocket
-
support upgrading of HTTP connections to use WebSocket protocol if true, support HTTP only if false
Attributes
Members list
In this article