case class Server(portBindings: List[PortBinding], handlers: List[() => ChannelHandler], beforeStopBlock: () => Unit, chunkSize: Int, engine: Engine) extends RunnableServer with PlanServer[ChannelHandler] with PortBindings with Builder[Server] with Product with Serializable
A RunnableServer backed by a list of netty bootstrapped port bindings
- portBindings
a list of port bindings
- handlers
a list of functions which produce channel handlers
- beforeStopBlock
a function to be invoked when the server is shutdown before channels are closed
- chunkSize
the maximum size allowed for request body chunks
- engine
defines a set of resourced used to make a netty server run
- Source
- Server.scala
- Alphabetic
- By Inheritance
- Server
- Serializable
- Product
- Equals
- Builder
- PortBindings
- PlanServer
- RunnableServer
- StartableServer
- Server
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Server(portBindings: List[PortBinding], handlers: List[() => ChannelHandler], beforeStopBlock: () => Unit, chunkSize: Int, engine: Engine)
- portBindings
a list of port bindings
- handlers
a list of functions which produce channel handlers
- beforeStopBlock
a function to be invoked when the server is shutdown before channels are closed
- chunkSize
the maximum size allowed for request body chunks
- engine
defines a set of resourced used to make a netty server run
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def acceptor(group: EventLoopGroup): Server
Specifies the EventLoopGroup use to handle incoming connections
Specifies the EventLoopGroup use to handle incoming connections
- Definition Classes
- Builder
- val allInterfacesHost: String
- Definition Classes
- PortBindings
- def anylocal: Server
- Definition Classes
- PortBindings
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def beforeStop(block: => Unit): Server
- val beforeStopBlock: () => Unit
- def bind(binding: PortBinding): Server
- Definition Classes
- Server → PortBindings
- def channels(group: ChannelGroup): Server
Specifies the ChannelGroup used for collecting connected channels
Specifies the ChannelGroup used for collecting connected channels
- Definition Classes
- Builder
- def channelsExecutor(executor: EventExecutor): Server
Sets channels to a DefaultChannelGroup using the given executor
Sets channels to a DefaultChannelGroup using the given executor
- Definition Classes
- Builder
- val chunkSize: Int
- def chunked(size: Int): Server
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def closeConnections(): Server
- def configure(bootstrap: ServerBootstrap): ServerBootstrap
- val defaultHttpPort: Int
- Definition Classes
- PortBindings
- val defaultHttpsPort: Int
- Definition Classes
- PortBindings
- def destroy(): Server
Destroys the provided worker event loop group before destroying the acceptors event loop group
Destroys the provided worker event loop group before destroying the acceptors event loop group
- Definition Classes
- Server → StartableServer
- val engine: Engine
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def handler(h: ChannelHandler): Server
- val handlers: List[() => ChannelHandler]
- def http(port: Int = defaultHttpPort, host: String = allInterfacesHost): Server
- Definition Classes
- PortBindings
- def https(port: Int = defaultHttpsPort, host: String = allInterfacesHost, ssl: SslContextProvider): Server
- Definition Classes
- PortBindings
- def httpsEngine(port: Int = defaultHttpsPort, host: String = allInterfacesHost, ssl: SslEngineProvider): Server
- Definition Classes
- PortBindings
- def initializer(binding: PortBinding): ChannelInitializer[SocketChannel]
- binding
a binder which may contribute to channel initialization
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def local(port: Int): Server
- Definition Classes
- PortBindings
- val localInterfaceHost: String
- Definition Classes
- PortBindings
- def makePlan(plan: => ChannelHandler): Server
- Definition Classes
- Server → PlanServer
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def plan(plan: ChannelHandler): ServerBuilder
- Definition Classes
- PlanServer
- val portBindings: List[PortBinding]
- Definition Classes
- Server → StartableServer
- def ports: Iterable[Int]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def resources(path: URL, cacheSeconds: Int = 60, passOnFail: Boolean = true): Server
- def run(afterStart: (ServerBuilder) => Unit, afterStop: (ServerBuilder) => Unit): Unit
- Definition Classes
- RunnableServer
- def run(afterStart: (ServerBuilder) => Unit): Unit
- Definition Classes
- RunnableServer
- def run(): Unit
- Definition Classes
- RunnableServer
- def start(prebind: (ServerBootstrap) => ServerBootstrap): Server
Starts server in the background after applying a function to each port bindings server bootstrap
- def start(): Server
Starts server in the background
Starts server in the background
- Definition Classes
- Server → StartableServer
- def stop(): Server
Stops server running the background.
Stops server running the background. If provided, the beforeStop block will be invoked before closing channel connections. Any listed cycle plans will be shutdown in the order provided. Lastly shared thread resources will be released.
- Definition Classes
- Server → StartableServer
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def use(engine: Engine): Server
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def workers(group: EventLoopGroup): Server
Specifies the EventLoopGroup use to handle processing of registered channels
Specifies the EventLoopGroup use to handle processing of registered channels
- Definition Classes
- Builder