|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.core.platform.osgi.util.OSGiReflectUtilHelper
public class OSGiReflectUtilHelper
OSGiReflectUtilHelper is an implementation of the ReflectUtilHelper
interface,
which allows platforms to extend the behavior of the ReflectUtils class.
Additonally, this class acts as a repository for Resource and Capability implementations
that may be shared between bundles - simplifying the management of bundle dependencies when
using default capability and resource implementations provide by Muse.
The repository is initialized by locating instance of ResourceManagementImplementation services
exported by bundles with contributions to make to the helper class. Most of the muse-*-impl or
muse-*-api bundle activators are contribution providers.
ReflectUtilHelper
,
ReflectUtils
,
ResourceManagementImplementation
Method Summary | |
---|---|
boolean |
exists(String className)
existence check for a class |
Class |
getClass(String className)
attempts to load a Class from the executing thread's bundle context. |
static OSGiReflectUtilHelper |
getDefault()
access to the singleton instance of the OSGiReflectUtilHelper |
InputStream |
getResource(String name)
attempts to resolve a resource from contributions made by other bundles. |
org.osgi.framework.Bundle |
getThreadLocalBundle()
getter for the thread local bundle of the executing thread. |
void |
initialize(org.osgi.framework.BundleContext context)
initializes the helper class by locating all instances of ResourceManagementImplementation
services and loading their contributions into the helper class. |
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
ServiceListener method for dealing with ResourceManagementImplementation service lifecycle events. |
void |
setThreadLocalBundle(org.osgi.framework.Bundle bundle)
setter for the thread local bundle for the executing thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setThreadLocalBundle(org.osgi.framework.Bundle bundle)
bundle
- public org.osgi.framework.Bundle getThreadLocalBundle()
public static OSGiReflectUtilHelper getDefault()
public void initialize(org.osgi.framework.BundleContext context)
ResourceManagementImplementation
services and loading their contributions into the helper class.
context
- public boolean exists(String className)
exists
in interface ReflectUtilHelper
className
- the name of the class in question
return true
if the class exists in the executing thread's bundle context,
otherwise false
public Class getClass(String className)
getClass
in interface ReflectUtilHelper
className
- the name of the class in question
Class
if the class exists in the executing thread's bundle context,
otherwise null
public InputStream getResource(String name)
name
-
public void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged
in interface org.osgi.framework.ServiceListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |