public abstract class XmlConfigServiceLoader extends AbstractFileProcessor implements ServiceLoader, Configuration
caches, changeList, deleteList, fileObjects, fileResolverDEFAULT_PRECEDENCE, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
XmlConfigServiceLoader() |
| Modifier and Type | Method and Description |
|---|---|
void |
config(XmlNode applicationConfig,
XmlNode componentConfig)
设置配置信息,应用配置和组件配置内容合并
|
XmlNode |
getApplicationConfig()
获取应用配置信息
|
String |
getApplicationNodePath()
获取在application.xml中配置对象的相对路径
|
XmlNode |
getComponentConfig()
获取组件配置信息
|
String |
getComponentConfigPath()
返回该配置对象组件配置的相对路径,相对于classpath的路径。
|
protected abstract List<ServiceComponents> |
getServiceComponents() |
protected abstract Object |
getServiceInstance(ServiceComponent serviceComponent) |
void |
loadService(ServiceRegistry serviceRegistry,
ClassLoader classLoader)
载入服务
|
void |
process()
对文件进行处理
|
protected void |
registerServices(Object object,
ServiceComponent serviceComponent,
ServiceRegistry serviceRegistry,
ClassLoader classLoader)
注册服务
|
void |
removeService(ServiceRegistry serviceRegistry,
ClassLoader classLoader) |
void |
removeServiceComponents(ServiceRegistry serviceRegistry,
ServiceComponents serviceComponents) |
add, checkMatch, clean, convertFromXml, delete, getFileResolver, getOrder, isMatch, modify, noChange, setFileResolver, supportRefreshclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConfigPathpublic void loadService(ServiceRegistry serviceRegistry, ClassLoader classLoader) throws ServiceLoadException
loadService in interface ServiceLoaderServiceLoadExceptionpublic void removeService(ServiceRegistry serviceRegistry, ClassLoader classLoader)
removeService in interface ServiceLoaderpublic void removeServiceComponents(ServiceRegistry serviceRegistry, ServiceComponents serviceComponents)
protected void registerServices(Object object, ServiceComponent serviceComponent, ServiceRegistry serviceRegistry, ClassLoader classLoader) throws ClassNotFoundException, ServiceLoadException
object - serviceComponent - serviceRegistry - ServiceLoadExceptionClassNotFoundExceptionprotected abstract List<ServiceComponents> getServiceComponents()
protected abstract Object getServiceInstance(ServiceComponent serviceComponent) throws Exception
Exceptionpublic String getApplicationNodePath()
ConfigurationgetApplicationNodePath in interface ConfigurationgetApplicationNodePath in class AbstractFileProcessorpublic String getComponentConfigPath()
ConfigurationgetComponentConfigPath in interface ConfigurationgetComponentConfigPath in class AbstractFileProcessorpublic void config(XmlNode applicationConfig, XmlNode componentConfig)
Configurationconfig in interface Configurationconfig in class AbstractFileProcessorapplicationConfig - 应用配置节点componentConfig - 组件配置节点public XmlNode getComponentConfig()
ConfigurationgetComponentConfig in interface ConfigurationgetComponentConfig in class AbstractFileProcessorpublic XmlNode getApplicationConfig()
ConfigurationgetApplicationConfig in interface ConfigurationgetApplicationConfig in class AbstractFileProcessorpublic void process()
FileProcessorprocess in interface FileProcessorCopyright © 2006–2018 TinyGroup. All rights reserved.