org.springframework.osgi.io
Class OsgiBundleResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.osgi.io.OsgiBundleResourceLoader
- All Implemented Interfaces:
- ResourceLoader
public class OsgiBundleResourceLoader
- extends DefaultResourceLoader
OSGi specific ResourceLoader
implementation.
This loader resolves paths inside an OSGi bundle using the bundle native
methods. Please see OsgiBundleResource
javadoc for information on
what prefixes are supported.
- Author:
- Adrian Colyer, Costin Leau
- See Also:
Bundle
,
OsgiBundleResource
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OsgiBundleResourceLoader
public OsgiBundleResourceLoader(Bundle bundle)
- Creates a OSGi aware
ResourceLoader
using the given
bundle.
- Parameters:
bundle
- OSGi Bundle
to be used by this loader
loader.
getResourceByPath
protected Resource getResourceByPath(String path)
- Overrides:
getResourceByPath
in class DefaultResourceLoader
getResource
public Resource getResource(String location)
- Specified by:
getResource
in interface ResourceLoader
- Overrides:
getResource
in class DefaultResourceLoader
getBundle
public final Bundle getBundle()
- Returns the bundle used by this loader.
- Returns:
- OSGi
Bundle
used by this resource
Copyright © 2006-2009 Spring Framework. All Rights Reserved.