public class FileResolverImpl extends Object implements FileResolver
BEAN_NAME
Constructor and Description |
---|
FileResolverImpl() |
FileResolverImpl(boolean b) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeLisenter(ChangeListener listener)
Deprecated.
|
void |
addChangeListener(ChangeListener listener)
添加文件变化监听器
|
void |
addFileProcessor(FileProcessor fileProcessor)
增加文件处理器
|
void |
addIncludePathPattern(String pattern)
手工添加扫描的匹配列表,如果有包含列表,则按包含列表
|
void |
addResolveFileObject(FileObject fileObject)
添加扫描的路径
|
void |
addResolvePath(List<String> paths)
添加扫描路径
|
void |
addResolvePath(String path)
添加扫描路径
|
void |
change()
文件变化触发的方法,会触发所有 ChangeListener
|
void |
config(XmlNode applicationConfig,
XmlNode componentConfig)
设置配置信息,应用配置和组件配置内容合并
|
XmlNode |
getApplicationConfig()
获取应用配置信息
|
String |
getApplicationNodePath()
获取在application.xml中配置对象的相对路径
|
List<ChangeListener> |
getChangeListeners()
返回所有的文件监听器列表
|
ClassLoader |
getClassLoader()
返回类加载器
|
XmlNode |
getComponentConfig()
获取组件配置信息
|
String |
getComponentConfigPath()
返回该配置对象组件配置的相对路径,相对于classpath的路径。
|
List<FileProcessor> |
getFileProcessorList()
返回所有的文件处理器
|
int |
getFileProcessorThreadNumber()
获取文件处理的线程数目
|
Map<String,Pattern> |
getIncludePathPatternMap()
返回所有的扫描路径正则
|
List<String> |
getScanningPaths()
返回当前FileResolver要扫描的根路径列表
|
void |
refresh()
刷新工作
|
void |
removeResolvePath(String path)
移除扫描路径
|
void |
resolve()
文件处理方法
|
void |
setChangeListeners(List<ChangeListener> changeListeners) |
void |
setClassLoader(ClassLoader classLoader)
设置类加载器
|
void |
setFileProcessorList(List<FileProcessor> fileProcessorList) |
void |
setFileProcessorThreadNumber(int threadNum)
设置文件处理的线程数目
|
public FileResolverImpl()
public FileResolverImpl(boolean b)
public List<ChangeListener> getChangeListeners()
FileResolver
getChangeListeners
in interface FileResolver
public void setChangeListeners(List<ChangeListener> changeListeners)
public List<String> getScanningPaths()
FileResolver
getScanningPaths
in interface FileResolver
public List<FileProcessor> getFileProcessorList()
FileResolver
getFileProcessorList
in interface FileResolver
public void setFileProcessorList(List<FileProcessor> fileProcessorList)
public void addFileProcessor(FileProcessor fileProcessor)
FileResolver
addFileProcessor
in interface FileResolver
fileProcessor
- 文件处理器public ClassLoader getClassLoader()
FileResolver
getClassLoader
in interface FileResolver
public void setClassLoader(ClassLoader classLoader)
FileResolver
setClassLoader
in interface FileResolver
classLoader
- 类加载器public void resolve()
FileResolver
resolve
in interface FileResolver
public void addIncludePathPattern(String pattern)
FileResolver
addIncludePathPattern
in interface FileResolver
pattern
- 扫描路径的正则public void addResolveFileObject(FileObject fileObject)
FileResolver
addResolveFileObject
in interface FileResolver
fileObject
- 文件对象public void addResolvePath(String path)
FileResolver
addResolvePath
in interface FileResolver
path
- 扫描路径public void addResolvePath(List<String> paths)
FileResolver
addResolvePath
in interface FileResolver
paths
- 扫描路径列表public int getFileProcessorThreadNumber()
FileResolver
getFileProcessorThreadNumber
in interface FileResolver
public void setFileProcessorThreadNumber(int threadNum)
FileResolver
setFileProcessorThreadNumber
in interface FileResolver
public void refresh()
refresh
in interface FileResolver
public String getApplicationNodePath()
Configuration
getApplicationNodePath
in interface Configuration
public String getComponentConfigPath()
Configuration
getComponentConfigPath
in interface Configuration
public void config(XmlNode applicationConfig, XmlNode componentConfig)
Configuration
config
in interface Configuration
applicationConfig
- 应用配置节点componentConfig
- 组件配置节点public XmlNode getComponentConfig()
Configuration
getComponentConfig
in interface Configuration
public XmlNode getApplicationConfig()
Configuration
getApplicationConfig
in interface Configuration
public Map<String,Pattern> getIncludePathPatternMap()
FileResolver
getIncludePathPatternMap
in interface FileResolver
@Deprecated public void addChangeLisenter(ChangeListener listener)
addChangeLisenter
in interface FileResolver
public void addChangeListener(ChangeListener listener)
FileResolver
addChangeListener
in interface FileResolver
public void change()
FileResolver
change
in interface FileResolver
public void removeResolvePath(String path)
FileResolver
removeResolvePath
in interface FileResolver
path
- 扫描路径Copyright © 2006–2018 TinyGroup. All rights reserved.