public final class Karyon
extends java.lang.Object
Bootstrap annotations it is easier to use KaryonRunner passing the main class containing all the
Bootstrap annotations.| Modifier and Type | Method and Description |
|---|---|
static KaryonServer |
forApplication(java.lang.Class<?> mainClass,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer which uses the passed class to detect any modules. |
static KaryonServer |
forApplication(java.lang.Class<?> mainClass,
com.google.inject.Module... modules)
Creates a new
KaryonServer which uses the passed class to detect any modules. |
static KaryonServer |
forHttpServer(io.reactivex.netty.protocol.http.server.HttpServer<?,?> server,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer which combines lifecycle of the passed HttpServer with
it's own lifecycle. |
static KaryonServer |
forHttpServer(io.reactivex.netty.protocol.http.server.HttpServer<?,?> server,
com.google.inject.Module... modules)
Creates a new
KaryonServer which combines lifecycle of the passed HttpServer with
it's own lifecycle. |
static KaryonServer |
forModules(com.google.inject.Module... modules)
Creates a new
KaryonServer from the passed modules. |
static KaryonServer |
forRequestHandler(int port,
io.reactivex.netty.protocol.http.server.RequestHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer that has a single HTTP server instance which delegates all request
handling to RequestHandler. |
static KaryonServer |
forRequestHandler(int port,
io.reactivex.netty.protocol.http.server.RequestHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler,
com.google.inject.Module... modules)
Creates a new
KaryonServer that has a single HTTP server instance which delegates all request
handling to RequestHandler. |
static KaryonServer |
forServer(KaryonServer server,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer which combines lifecycle of the passed KaryonServer with
it's own lifecycle. |
static KaryonServer |
forServer(KaryonServer server,
com.google.inject.Module... modules)
Creates a new
KaryonServer which combines lifecycle of the passed KaryonServer with
it's own lifecycle. |
static KaryonServer |
forSuites(com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer from the passed bootstrapModules. |
static KaryonServer |
forTcpConnectionHandler(int port,
io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer that has a single TCP server instance which delegates all connection
handling to ConnectionHandler. |
static KaryonServer |
forTcpConnectionHandler(int port,
io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler,
com.google.inject.Module... modules)
Creates a new
KaryonServer that has a single TCP server instance which delegates all connection
handling to ConnectionHandler. |
static KaryonServer |
forTcpServer(io.reactivex.netty.server.RxServer<?,?> server,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer which combines lifecycle of the passed RxServer with
it's own lifecycle. |
static KaryonServer |
forTcpServer(io.reactivex.netty.server.RxServer<?,?> server,
com.google.inject.Module... modules)
Creates a new
KaryonServer which combines lifecycle of the passed RxServer with
it's own lifecycle. |
static KaryonServer |
forUdpConnectionHandler(int port,
io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer that has a single UDP server instance which delegates all connection
handling to ConnectionHandler. |
static KaryonServer |
forUdpConnectionHandler(int port,
io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler,
com.google.inject.Module... modules)
Creates a new
KaryonServer that has a single UDP server instance which delegates all connection
handling to ConnectionHandler. |
static KaryonServer |
forUdpServer(io.reactivex.netty.protocol.udp.server.UdpServer<?,?> server,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer which combines lifecycle of the passed UdpServer with
it's own lifecycle. |
static KaryonServer |
forUdpServer(io.reactivex.netty.protocol.udp.server.UdpServer<?,?> server,
com.google.inject.Module... modules)
Creates a new
KaryonServer which combines lifecycle of the passed UdpServer with
it's own lifecycle. |
static KaryonServer |
forWebSocketServer(io.reactivex.netty.server.RxServer<? extends io.netty.handler.codec.http.websocketx.WebSocketFrame,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> server,
com.netflix.governator.guice.BootstrapModule... bootstrapModules)
Creates a new
KaryonServer which combines lifecycle of the passed WebSockets RxServer with
it's own lifecycle. |
static KaryonServer |
forWebSocketServer(io.reactivex.netty.server.RxServer<? extends io.netty.handler.codec.http.websocketx.WebSocketFrame,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> server,
com.google.inject.Module... modules)
Creates a new
KaryonServer which combines lifecycle of the passed WebSockets RxServer with
it's own lifecycle. |
static com.netflix.governator.guice.BootstrapModule |
toBootstrapModule(java.lang.Class<? extends com.google.inject.Module>... moduleClasses) |
static com.netflix.governator.guice.BootstrapModule |
toBootstrapModule(java.lang.Class<? extends com.google.inject.Module> moduleClass) |
static com.netflix.governator.guice.BootstrapModule |
toBootstrapModule(com.google.inject.Module... modules) |
public static KaryonServer forRequestHandler(int port, io.reactivex.netty.protocol.http.server.RequestHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler, com.google.inject.Module... modules)
KaryonServer that has a single HTTP server instance which delegates all request
handling to RequestHandler.
The HttpServer is created using KaryonTransport.newHttpServer(int, HttpRequestHandler)port - Port for the server.handler - Request Handlermodules - Additional modules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forRequestHandler(int port, io.reactivex.netty.protocol.http.server.RequestHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer that has a single HTTP server instance which delegates all request
handling to RequestHandler.
The HttpServer is created using KaryonTransport.newHttpServer(int, HttpRequestHandler)port - Port for the server.handler - Request HandlerbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forTcpConnectionHandler(int port, io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler, com.google.inject.Module... modules)
KaryonServer that has a single TCP server instance which delegates all connection
handling to ConnectionHandler.
The RxServer is created using RxNetty.newTcpServerBuilder(int, ConnectionHandler)port - Port for the server.handler - Connection Handlermodules - Additional modules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forTcpConnectionHandler(int port, io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer that has a single TCP server instance which delegates all connection
handling to ConnectionHandler.
The RxServer is created using RxNetty.newTcpServerBuilder(int, ConnectionHandler)port - Port for the server.handler - Connection HandlerbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forUdpConnectionHandler(int port, io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler, com.google.inject.Module... modules)
KaryonServer that has a single UDP server instance which delegates all connection
handling to ConnectionHandler.
The RxServer is created using RxNetty.newUdpServerBuilder(int, ConnectionHandler)port - Port for the server.handler - Connection Handlermodules - Additional modules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forUdpConnectionHandler(int port, io.reactivex.netty.channel.ConnectionHandler<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> handler, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer that has a single UDP server instance which delegates all connection
handling to ConnectionHandler.
The RxServer is created using RxNetty.newUdpServerBuilder(int, ConnectionHandler)port - Port for the server.handler - Connection HandlerbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forTcpServer(io.reactivex.netty.server.RxServer<?,?> server, com.google.inject.Module... modules)
KaryonServer which combines lifecycle of the passed RxServer with
it's own lifecycle.server - TCP servermodules - Additional modules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forTcpServer(io.reactivex.netty.server.RxServer<?,?> server, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer which combines lifecycle of the passed RxServer with
it's own lifecycle.server - TCP serverbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forHttpServer(io.reactivex.netty.protocol.http.server.HttpServer<?,?> server, com.google.inject.Module... modules)
KaryonServer which combines lifecycle of the passed HttpServer with
it's own lifecycle.server - HTTP servermodules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forHttpServer(io.reactivex.netty.protocol.http.server.HttpServer<?,?> server, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer which combines lifecycle of the passed HttpServer with
it's own lifecycle.server - HTTP serverbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forWebSocketServer(io.reactivex.netty.server.RxServer<? extends io.netty.handler.codec.http.websocketx.WebSocketFrame,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> server, com.google.inject.Module... modules)
KaryonServer which combines lifecycle of the passed WebSockets RxServer with
it's own lifecycle.server - WebSocket servermodules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forWebSocketServer(io.reactivex.netty.server.RxServer<? extends io.netty.handler.codec.http.websocketx.WebSocketFrame,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> server, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer which combines lifecycle of the passed WebSockets RxServer with
it's own lifecycle.server - WebSocket serverbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forUdpServer(io.reactivex.netty.protocol.udp.server.UdpServer<?,?> server, com.google.inject.Module... modules)
KaryonServer which combines lifecycle of the passed UdpServer with
it's own lifecycle.server - UDP servermodules - Additional modules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forUdpServer(io.reactivex.netty.protocol.udp.server.UdpServer<?,?> server, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer which combines lifecycle of the passed UdpServer with
it's own lifecycle.server - UDP serverbootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forServer(KaryonServer server, com.google.inject.Module... modules)
KaryonServer which combines lifecycle of the passed KaryonServer with
it's own lifecycle. This is useful when a KaryonServer is already present and the passed
Modules are to be added to that server.server - An existing karyon servermodules - Additional modules.KaryonServer which is to be used to start the created server.public static KaryonServer forServer(KaryonServer server, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer which combines lifecycle of the passed KaryonServer with
it's own lifecycle. This is useful when a KaryonServer is already present and the passed
BootstrapModules are to be added to that server.server - An existing karyon serverbootstrapModules - Additional bootstrapModules.KaryonServer which is to be used to start the created server.public static KaryonServer forApplication(java.lang.Class<?> mainClass, com.google.inject.Module... modules)
KaryonServer which uses the passed class to detect any modules.mainClass - Any class/interface containing governator's Bootstrap annotations.modules - Additional modules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forApplication(java.lang.Class<?> mainClass, com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer which uses the passed class to detect any modules.mainClass - Any class/interface containing governator's Bootstrap annotations.bootstrapModules - Additional bootstrapModules if any.KaryonServer which is to be used to start the created server.public static KaryonServer forModules(com.google.inject.Module... modules)
KaryonServer from the passed modules.modules - Modules to use for the server.KaryonServer which is to be used to start the created server.public static KaryonServer forSuites(com.netflix.governator.guice.BootstrapModule... bootstrapModules)
KaryonServer from the passed bootstrapModules.bootstrapModules - Bootstrap modules to use for the server.KaryonServer which is to be used to start the created server.public static com.netflix.governator.guice.BootstrapModule toBootstrapModule(com.google.inject.Module... modules)
@SafeVarargs public static com.netflix.governator.guice.BootstrapModule toBootstrapModule(java.lang.Class<? extends com.google.inject.Module>... moduleClasses)
public static com.netflix.governator.guice.BootstrapModule toBootstrapModule(java.lang.Class<? extends com.google.inject.Module> moduleClass)