public class OsgiBundleResourceLoader
extends org.springframework.core.io.DefaultResourceLoader
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.Bundle
,
OsgiBundleResource
Constructor and Description |
---|
OsgiBundleResourceLoader(org.osgi.framework.Bundle bundle)
Creates a OSGi aware
ResourceLoader using the given
bundle. |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Bundle |
getBundle()
Returns the bundle used by this loader.
|
org.springframework.core.io.Resource |
getResource(String location) |
protected org.springframework.core.io.Resource |
getResourceByPath(String path) |
public OsgiBundleResourceLoader(org.osgi.framework.Bundle bundle)
ResourceLoader
using the given
bundle.bundle
- OSGi Bundle
to be used by this loader
loader.protected org.springframework.core.io.Resource getResourceByPath(String path)
getResourceByPath
in class org.springframework.core.io.DefaultResourceLoader
public org.springframework.core.io.Resource getResource(String location)
getResource
in interface org.springframework.core.io.ResourceLoader
getResource
in class org.springframework.core.io.DefaultResourceLoader
public final org.osgi.framework.Bundle getBundle()
Bundle
used by this resourceCopyright © 2006–2019. All rights reserved.