java.lang.Object
io.jooby.Server.Base
io.jooby.netty.NettyServer
- All Implemented Interfaces:
io.jooby.Server
public class NettyServer
extends io.jooby.Server.Base
Web server implementation using Netty.
- Since:
- 2.0.0
- Author:
- edgar
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jooby.Server
io.jooby.Server.Base -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.NettyServer(io.jooby.ServerOptions options) Creates a server.NettyServer(io.jooby.ServerOptions options, ExecutorService worker) Creates a server.NettyServer(ExecutorService worker) Creates a server. -
Method Summary
Modifier and TypeMethodDescriptiongetName()io.jooby.output.OutputFactorysetSingleEventLoopGroup(boolean value) Configure netty to use a single event loop group.io.jooby.Serverstart(io.jooby.Jooby... application) io.jooby.Serverstop()Methods inherited from class io.jooby.Server.Base
getOptions, setOptionsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jooby.Server
getLoggerOff, init
-
Constructor Details
-
NettyServer
Creates a server.- Parameters:
options- Options.worker- Thread-pool to use.
-
NettyServer
Creates a server.- Parameters:
worker- Thread-pool to use.
-
NettyServer
public NettyServer(@NonNull io.jooby.ServerOptions options) Creates a server.- Parameters:
options- Configuration options.
-
NettyServer
public NettyServer()Default constructor.
-
-
Method Details
-
setSingleEventLoopGroup
Configure netty to use a single event loop group. When true, the acceptor and eventLoop share the sameEventLoopGroup. Default istrue.- Parameters:
value- True for sharedEventLoopGroup.- Returns:
- This server.
-
getOutputFactory
public io.jooby.output.OutputFactory getOutputFactory() -
getName
-
start
public io.jooby.Server start(@NonNull io.jooby.Jooby... application) -
stop
public io.jooby.Server stop()
-