public interface Server
Server server = new Netty(); // or Jetty or Utow
App app = new App();
server.start(app);
...
server.stop();
Modifier and Type | Interface and Description |
---|---|
static class |
Server.Base
Base class for server.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
connectionLost(Throwable cause)
Test whenever the given exception is a connection-lost.
|
ServerOptions |
getOptions()
Get server options.
|
static boolean |
isAddressInUse(Throwable cause)
Whenever the given exception is an address already in use.
|
default void |
join()
Deprecated.
This method is planned to be removed in next major release (3.x)
|
Server |
setOptions(ServerOptions options)
Set server options.
|
Server |
start(Jooby application)
Start an application.
|
Server |
stop()
Stop the server.
|
@Nonnull Server setOptions(@Nonnull ServerOptions options)
options
- Server options.@Nonnull ServerOptions getOptions()
@Nonnull Server start(@Nonnull Jooby application)
application
- Application to start.@Deprecated @Nonnull default void join()
static boolean connectionLost(@Nullable Throwable cause)
cause
- Exception to check.Copyright © 2020. All rights reserved.