public class BtRuntimeBuilder extends Object
Constructor and Description |
---|
BtRuntimeBuilder()
Create runtime builder with default config.
|
BtRuntimeBuilder(Config config)
Create runtime builder with provided config.
|
Modifier and Type | Method and Description |
---|---|
BtRuntimeBuilder |
autoLoadModules()
If this option is set, Bt will use the service loading mechanism
to load any modules that are available on application's classpath.
|
BtRuntime |
build() |
BtRuntimeBuilder |
config(Config config)
Set runtime config.
|
BtRuntimeBuilder |
disableAutomaticShutdown()
Disable automatic runtime shutdown, when all clients have been stopped.
|
BtRuntimeBuilder |
disableLocalServiceDiscovery()
If this options is set, Bt will not automatically load standard extension
LocalServiceDiscoveryModule |
BtRuntimeBuilder |
disablePeerExchange()
If this options is set, Bt will not automatically load standard extension
PeerExchangeModule |
BtRuntimeBuilder |
disableStandardExtensions()
If this options is set, Bt will not automatically load standard extensions, such as PEX or LSD.
|
Config |
getConfig()
Get this builder's config.
|
BtRuntimeBuilder |
module(Class<? extends com.google.inject.Module> adapterType)
Contribute an extra module into the runtime.
|
BtRuntimeBuilder |
module(com.google.inject.Module adapter)
Contribute an extra module into the runtime.
|
public BtRuntimeBuilder()
public BtRuntimeBuilder(Config config)
config
- Runtime configpublic BtRuntimeBuilder config(Config config)
public Config getConfig()
public BtRuntimeBuilder module(com.google.inject.Module adapter)
public BtRuntimeBuilder module(Class<? extends com.google.inject.Module> adapterType)
public BtRuntimeBuilder disableAutomaticShutdown()
public BtRuntimeBuilder autoLoadModules()
To support auto-loading a module should expose BtModuleProvider
provider.
Auto-loaded modules will be used in default configuration.
public BtRuntimeBuilder disableStandardExtensions()
public BtRuntimeBuilder disablePeerExchange()
PeerExchangeModule
public BtRuntimeBuilder disableLocalServiceDiscovery()
LocalServiceDiscoveryModule
public BtRuntime build()
Copyright © 2016–2021. All rights reserved.