org.eclipse.gemini.blueprint.io
Class OsgiBundleResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.eclipse.gemini.blueprint.io.OsgiBundleResourceLoader
- All Implemented Interfaces:
- org.springframework.core.io.ResourceLoader
public class OsgiBundleResourceLoader
- extends org.springframework.core.io.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
Fields inherited from interface org.springframework.core.io.ResourceLoader |
CLASSPATH_URL_PREFIX |
Constructor Summary |
OsgiBundleResourceLoader(org.osgi.framework.Bundle bundle)
Creates a OSGi aware ResourceLoader using the given
bundle. |
Methods inherited from class org.springframework.core.io.DefaultResourceLoader |
getClassLoader, setClassLoader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OsgiBundleResourceLoader
public OsgiBundleResourceLoader(org.osgi.framework.Bundle bundle)
- Creates a OSGi aware
ResourceLoader
using the given
bundle.
- Parameters:
bundle
- OSGi Bundle
to be used by this loader
loader.
getResourceByPath
protected org.springframework.core.io.Resource getResourceByPath(String path)
- Overrides:
getResourceByPath
in class org.springframework.core.io.DefaultResourceLoader
getResource
public org.springframework.core.io.Resource getResource(String location)
- Specified by:
getResource
in interface org.springframework.core.io.ResourceLoader
- Overrides:
getResource
in class org.springframework.core.io.DefaultResourceLoader
getBundle
public final org.osgi.framework.Bundle getBundle()
- Returns the bundle used by this loader.
- Returns:
- OSGi
Bundle
used by this resource
Copyright © 2006-2013. All Rights Reserved.