org.apache.struts2.osgi
Class OsgiUtil
java.lang.Object
org.apache.struts2.osgi.OsgiUtil
public class OsgiUtil
- extends Object
Method Summary |
static boolean |
containsBean(Object beanFactory,
String beanId)
Calls containsBean on the passed object using refelection. |
static Object |
getBean(Object beanFactory,
String beanId)
Calls getBean() on the passed object using refelection. |
static URL |
translateBundleURLToJarURL(URL bundleUrl,
org.osgi.framework.Bundle bundle)
A bundle is a jar, and a bunble URL will be useless to clients, this method translates
a URL to a resource inside a bundle from "bundle:something/path" to "jar:file:bundlelocation!/path" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OsgiUtil
public OsgiUtil()
translateBundleURLToJarURL
public static URL translateBundleURLToJarURL(URL bundleUrl,
org.osgi.framework.Bundle bundle)
throws MalformedURLException
- A bundle is a jar, and a bunble URL will be useless to clients, this method translates
a URL to a resource inside a bundle from "bundle:something/path" to "jar:file:bundlelocation!/path"
- Throws:
MalformedURLException
getBean
public static Object getBean(Object beanFactory,
String beanId)
- Calls getBean() on the passed object using refelection. Used on Spring context
because they are loaded from bundles (in anothe class loader)
containsBean
public static boolean containsBean(Object beanFactory,
String beanId)
- Calls containsBean on the passed object using refelection. Used on Spring context
because they are loaded from bundles (in anothe class loader)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.