public class HotResourceLoader
extends java.lang.Object
implements org.frameworkset.util.io.ResourceLoader
Title: DefaultResourceLoader.java
Description:
bboss workgroup
Copyright (c) 2007
| 构造器和说明 |
|---|
HotResourceLoader()
Create a new DefaultResourceLoader.
|
HotResourceLoader(java.lang.ClassLoader classLoader)
Create a new DefaultResourceLoader.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.ClassLoader |
getClassLoader()
Return the ClassLoader to load class path resources with,
or
null if using the thread context class loader on actual access
(applying to the thread that constructs the ClassPathResource object). |
org.frameworkset.util.io.Resource |
getResource(java.lang.String location) |
protected org.frameworkset.util.io.Resource |
getResourceByPath(java.lang.String path)
Return a Resource handle for the resource at the given path.
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Specify the ClassLoader to load class path resources with, or
null
for using the thread context class loader at the time of actual resource access. |
public HotResourceLoader()
ClassLoader access will happen using the thread context class loader at the time of this ResourceLoader's initialization.
Thread.getContextClassLoader()public HotResourceLoader(java.lang.ClassLoader classLoader)
classLoader - the ClassLoader to load class path resources with, or null
for using the thread context class loader at the time of actual resource accesspublic void setClassLoader(java.lang.ClassLoader classLoader)
null
for using the thread context class loader at the time of actual resource access.
The default is that ClassLoader access will happen using the thread context class loader at the time of this ResourceLoader's initialization.
public java.lang.ClassLoader getClassLoader()
null if using the thread context class loader on actual access
(applying to the thread that constructs the ClassPathResource object).
Will get passed to ClassPathResource's constructor for all ClassPathResource objects created by this resource loader.
getClassLoader 在接口中 org.frameworkset.util.io.ResourceLoaderClassPathResourcepublic org.frameworkset.util.io.Resource getResource(java.lang.String location)
getResource 在接口中 org.frameworkset.util.io.ResourceLoaderprotected org.frameworkset.util.io.Resource getResourceByPath(java.lang.String path)
The default implementation supports class path locations. This should be appropriate for standalone implementations but can be overridden, e.g. for implementations targeted at a Servlet container.
path - the path to the resourceClassPathResource