This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[io.airlit.sample.Main.main()] | |
- Bootstrap app = new Bootstrap( | |
new NodeModule(), | |
new DiscoveryModule(), | |
new HttpServerModule(), | |
new JsonModule(), | |
new JaxrsModule(), | |
new MBeanModule(), | |
new JmxModule(), | |
new JmxHttpModule(), | |
new JmxHttpRpcModule(), | |
new LogJmxModule(), | |
new HttpEventModule(), | |
new TraceTokenModule(), | |
new MainModule()); | |
- Injector injector = app.strictConfig().initialize(); | |
- injector.getInstance(Announcer.class).start() | |
================ | |
[io.airlift.bootstrap.Bootstrap] | |
- Bootstrap(Module... modules) | |
- Bootstrap#initialize() | |
- configuration(logging...) | |
- set moduleList | |
- LifeCycleModule | |
- ConfigurationModule | |
- ValidationErrorModule | |
- WarningsMonitor | |
- modules passed as constructor's arguments | |
- Injector injector = Guice.createInjector(Stage.PRODUCTION, moduleList.build()); | |
- LifeCycleManager lifeCycleManager = injector.getInstance(LifeCycleManager.class); | |
- lifeCycleManager.start(); | |
================ | |
[NodeModule] | |
- NodeConfig#(set|getNodeId()), (set|getBinarySpec()) for "node.id", "node.binary-spec", etc... | |
the configuration is handled by ConfigurationModule.bindConfig(binder).to(NodeConfig.class) in NodeModule | |
- @Inject # <= injected by NodeModule | |
public NodeInfo(NodeConfig config) | |
{ | |
this(config.getEnvironment(), | |
config.getPool(), | |
config.getNodeId(), | |
config.getNodeInternalIp(), | |
config.getNodeBindIp(), | |
config.getNodeExternalAddress(), | |
config.getLocation(), | |
config.getBinarySpec(), | |
config.getConfigSpec() | |
); | |
} | |
================ | |
[DiscoveryModule] | |
- io.airlift.discovery.client.ServiceInventory | |
- start() : repeats calling updateServiceInventory() | |
- updateServiceInventory() : accesses serviceInventoryUri and gets list of ServiceDescripter | |
- ServiceInventoryConfig => "service-inventory.uri" | |
- DiscoveryClientConfig | |
- HttpDiscoveryLookupClient | |
- HttpDiscoveryAnnouncementClient | |
- ServiceDescriptorsRepresentation | |
- Announcement | |
- ForDiscoveryClient | |
- Announcer | |
- ServiceAnnouncement | |
- CachingServiceSelectorFactory | |
- MergingServiceSelectorFactory | |
- ServiceSelector | |
- ServiceSelectorManager | |
================ | |
[HttpServerModule] | |
================ | |
[JsonModule] | |
================ | |
[JaxrsModule] | |
================ | |
[MBeanModule] | |
================ | |
[JmxModule] | |
================ | |
[JmxHttpModule] | |
================ | |
[JmxHttpRpcModule] | |
================ | |
[LogJmxModule] | |
================ | |
[HttpEventModule] | |
================ | |
[TraceTokenModule] | |
================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment