@Override protected void configure() { bindHealthCheck(bind(HealthCheckHandler.class)); bindHealthCheckInvocationStrategy(bind(HealthCheckInvocationStrategy.class)); } });
@Override public void startAndWaitTillShutdown() { start(); waitTillShutdown(); }
/** * Creates a new {@link KaryonServer} which uses the passed class to detect any modules. * * @param mainClass Any class/interface containing governator's {@link Bootstrap} annotations. * @param modules Additional modules if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forApplication(Class<?> mainClass, Module... modules) { return forApplication(mainClass, toSuite(modules)); }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link HttpServer} with * it's own lifecycle. * * @param server HTTP server * @param modules Additional suites if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forHttpServer(HttpServer<?, ?> server, Module... modules) { return forHttpServer(server, toSuite(modules)); }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed WebSockets {@link RxServer} with * it's own lifecycle. * * @param server WebSocket server * @param modules Additional suites if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forWebSocketServer(RxServer<? extends WebSocketFrame, ? extends WebSocketFrame> server, Module... modules) { return forWebSocketServer(server, toSuite(modules)); }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link UdpServer} with * it's own lifecycle. * * @param server UDP server * @param modules Additional modules if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forUdpServer(UdpServer<?, ?> server, Module... modules) { return forUdpServer(server, toSuite(modules)); }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link RxServer} with * it's own lifecycle. * * @param server TCP server * @param modules Additional modules if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forTcpServer(RxServer<?, ?> server, Module... modules) { return forTcpServer(server, toSuite(modules)); }
@Override public void startAndWaitTillShutdown() { start(); waitTillShutdown(); }
/** * Creates a new {@link KaryonServer} from the passed suites. * * @param suites Suites to use for the server. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forSuites(LifecycleInjectorBuilderSuite... suites) { return new MainClassBasedServer(KaryonServer.class, suites); }
@Override public final void start() { startWithAdditionalSuites(); }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link RxServer} with * it's own lifecycle. * * @param server TCP server * @param suites Additional suites if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forTcpServer(RxServer<?, ?> server, LifecycleInjectorBuilderSuite... suites) { return new RxNettyServerBackedServer(server, suites); }
public DefaultKaryonConfiguration build() throws Exception { return new DefaultKaryonConfiguration(this); } }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link KaryonServer} with * it's own lifecycle. This is useful when a {@link KaryonServer} is already present and the passed * {@link LifecycleInjectorBuilderSuite}s are to be added to that server. * * @param server An existing karyon server * @param suites Additional suites. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forServer(KaryonServer server, LifecycleInjectorBuilderSuite... suites) { return new KaryonServerBackedServer((AbstractKaryonServer)server, suites); }
@Override public void waitTillShutdown() { delegate.waitTillShutdown(); }
public static Builder<?> builder() { return new BuilderWrapper(); }
/** * Creates a new {@link KaryonServer} which uses the passed class to detect any modules. * * @param mainClass Any class/interface containing governator's {@link Bootstrap} annotations. * @param suites Additional suites if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forApplication(Class<?> mainClass, LifecycleInjectorBuilderSuite... suites) { return new MainClassBasedServer(mainClass, suites); }
@Override public void start() { delegate.startWithAdditionalSuites(suites); }
/** * Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link UdpServer} with * it's own lifecycle. * * @param server UDP server * @param suites Additional suites if any. * * @return {@link KaryonServer} which is to be used to start the created server. */ public static KaryonServer forUdpServer(UdpServer<?, ?> server, LifecycleInjectorBuilderSuite... suites) { return new RxNettyServerBackedServer(server, suites); }