Skip to content

Latest commit

 

History

History
 
 

atlas-core

atlas-core

Atlas-core is the client side runtime library in Atlas framework, the core's duty is to manage all bundles installation, operation, and update after application installed, When the client starts, the entrance is AtlasBridgeApplication (build process automatically replace), responsible for the operation of the container run, and start business specific Application code.

main function

Atlas-core starts, all of the bundle installation based on runtime, on-demand loaded by the container itself, at the same time, there are two tools allow direct call external at runtime to accomplish a specific function:

  1. RuntimeVariables.java: provides some commonly used variables are easy to use, such as application, currentprocess, etc.
  2. Atlas.java: provide some useful methods for external runtime, reference when using Atlas inside for public use block method

key classes

In addition to the above two classes and associated use some of the classes, the other type of container used internal operation, direct call at runtime is not recommended or modify the contents of the inside, the following basic mainly introduces several key classes:

  1. AtlasBundleInfoManager : using bundleinfo generated by parsing packaging files, manage inventory of all bundles in the information, component when trigger the bundle of routing through the list class bundle lookup.

  2. BaselineInfoManager: BaselineInfoManager: application, after dynamic deployment BaselinfInfoManager record the latest version , and all the bundles of the change of version, when the bundle loading by BaselineInfoManager for further checking, dynamic deployment failure will trigger version rollback also depends on the manager.

  3. DelegateClassLoader: replacing the original PathClassloader, taking it as a parent, is responsible for all bundleclassloader routing, itself is not responsible for the real class loading

  4. DelegateResource:run-time globally unique resource, each bundle installation update DelegateResources corresponding AssetsManager gives effect to its own resources

  5. BundleImpl BundleArchive BundleArchiveRevision: each runtime Bundle corresponding to an instance of BundleImpl , and Archive classes are used to bundle version of arbitration to choose matching, currentRevision record current bundle in the inside of the file system content

  6. KernalBundle & KernalBunleArchive: imitate the structure of the bundle, the host dynamic deployment occurs to the load in the form of KernalBundle dynamic deployment inside the host part of the updated content, ensure the runtime can cover the original logic in order to satisfy the host content dynamic update capability

  7. InstrumetionHook、ActivityManagerHook : those tools injection by hook or replace the android framework, guarantee the run-time correctly trigger a bundle installation, running task