public class CabinContainer extends Object
| 构造器和说明 |
|---|
CabinContainer(String executableURLString,
String[] javaAgentURLStrings,
String[] args)
Same as previous constructor, except this is used while launching the application in fat jar;
Create the biz URLs in CabinContainer, so the handler of the URL would bound to a JarFile, this will make the
biz class loading faster;
|
CabinContainer(String containerURLString,
String[] moduleURLStrings,
String[] bizURLStrings,
String[] javaAgentURLStrings,
String[] args)
instanced by bootstrap, launcher, Test runner;
start the container services pipeline to deploy modules, start services;
Should not pass any Object except primitives and String, because any Object like URL/JarFile would bring
SystemClassLoader with it; for example, 'URL' will bring a Handler loaded by SystemClassLoader which would load
other classes with SystemClassLoader; so we should not pass these Object, and make sure SystemClassLoader is
no longer used.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ClassLoader |
getBizModuleClassLoader() |
Map<String,Class<?>> |
getExportedClasses() |
ClassLoader |
getLibModuleClassLoader(String moduleName) |
List<String> |
getLoadedModule() |
boolean |
isStarted() |
boolean |
moduleLoaded(String moduleName) |
void |
start() |
void |
stop() |
public CabinContainer(String containerURLString, String[] moduleURLStrings, String[] bizURLStrings, String[] javaAgentURLStrings, String[] args)
this constructor is used while launching the application in classpath
containerURLString - the cabin core fat jar file pathmoduleURLStrings - the lib module fat jar file pathsbizURLStrings - the biz classpath pathsjavaAgentURLStrings - the setup java agent jar file pathsargs - set up main argspublic CabinContainer(String executableURLString, String[] javaAgentURLStrings, String[] args)
executableURLString - the application executable fat jarjavaAgentURLStrings - the setup java agent jar file pathsargs - set up main argspublic void start()
public void stop()
public boolean isStarted()
public boolean moduleLoaded(String moduleName)
public ClassLoader getLibModuleClassLoader(String moduleName)
public ClassLoader getBizModuleClassLoader()
Copyright © 2021. All rights reserved.