|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.netflix.karyon.server.ServerBootstrap
public class ServerBootstrap
This class is the point where the karyon environment in bootstrapped which more or less is the bootstrapping of
Governator.
LifecycleInjector
LifecycleInjector
for governator to be used by KaryonServer
to create a guice
injector. The injector is created with the following components:
PropertyNames.SERVER_BOOTSTRAP_BASE_PACKAGES_OVERRIDE
as a comman separated list of packages to
scan by governator.ArchaiusConfigurationProvider
as governator's ConfigurationProvider
HealthCheckHandler
implementation as specified by
PropertyNames.HEALTH_CHECK_HANDLER_CLASS_PROP_NAME
or a default handler DefaultHealthCheckHandler
HealthCheckInvocationStrategy
as specified by
PropertyNames.HEALTH_CHECK_STRATEGY
or the default AsyncHealthCheckInvocationStrategy
configureBootstrapBinder(BootstrapBinder)
: Callback to configure BootstrapBinder
before returning from Module.configure(Binder)
.configureBinder(com.google.inject.Binder)
: Callback to configure Binder
before returning from
BootstrapModule.configure(com.netflix.governator.guice.BootstrapBinder)
.beforeInjectorCreation(com.netflix.governator.guice.LifecycleInjectorBuilder)
: A callback
before creating the Injector
from LifecycleInjectorBuilder
provided by this class
to KaryonServer
getBasePackages()
: Specify the base packages to be added for
governator classpath scanning. This is in case for any reason one does not want to specify a property
PropertyNames.SERVER_BOOTSTRAP_BASE_PACKAGES_OVERRIDE
as mentioned above.getConfigurationProvider()
: Any custom configuration provider
that is to be used by governator. Defaults to ArchaiusConfigurationProvider
PropertyNames.SERVER_BOOTSTRAP_CLASS_OVERRIDE
. eg: -Dcom.netflix.karyon.server.bootstrap.class=com.mycompany.MyBootsrap
Constructor Summary | |
---|---|
ServerBootstrap()
|
Method Summary | |
---|---|
protected void |
beforeInjectorCreation(com.netflix.governator.guice.LifecycleInjectorBuilder builderToBeUsed)
A callback before creating the Injector from LifecycleInjectorBuilder provided
by this class to KaryonServer . |
protected void |
configureBinder(com.google.inject.Binder binder)
Callback to configure Binder before returning from Module.configure(Binder) . |
protected void |
configureBootstrapBinder(com.netflix.governator.guice.BootstrapBinder bootstrapBinder)
Callback to configure BootstrapBinder before returning from
BootstrapModule.configure(com.netflix.governator.guice.BootstrapBinder) . |
protected java.util.Collection<java.lang.String> |
getBasePackages()
Specify the base packages to be added for governator classpath scanning. |
protected java.lang.Class<? extends com.netflix.governator.configuration.ConfigurationProvider> |
getConfigurationProvider()
Returns the ConfigurationProvider to be used by governator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerBootstrap()
Method Detail |
---|
protected java.lang.Class<? extends com.netflix.governator.configuration.ConfigurationProvider> getConfigurationProvider()
ConfigurationProvider
to be used by governator. Defaults to ArchaiusConfigurationProvider
ConfigurationProvider
to be used, this will be instantiated by governator.protected void beforeInjectorCreation(com.netflix.governator.guice.LifecycleInjectorBuilder builderToBeUsed)
Injector
from LifecycleInjectorBuilder
provided
by this class to KaryonServer
.
Default implementation does nothing, so the overridden methods do not need to call super.
builderToBeUsed
- The builder to be used for creating an injector. This builder can be modified/configured
as required.protected void configureBinder(com.google.inject.Binder binder)
Binder
before returning from Module.configure(Binder)
.
Default implementation does nothing, so the overridden methods do not need to call super.
binder
- The binder as passed to the guice module used by karyon.protected void configureBootstrapBinder(com.netflix.governator.guice.BootstrapBinder bootstrapBinder)
BootstrapBinder
before returning from
BootstrapModule.configure(com.netflix.governator.guice.BootstrapBinder)
.
Default implementation does nothing, so the overridden methods do not need to call super.
bootstrapBinder
- The bootstrap binder as passed to BootstrapModule.configure(com.netflix.governator.guice.BootstrapBinder)
@Nullable protected java.util.Collection<java.lang.String> getBasePackages()
PropertyNames.SERVER_BOOTSTRAP_BASE_PACKAGES_OVERRIDE
as mentioned in
ServerBootstrap
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |