Class OSGIListener
java.lang.Object
com.sun.corba.ee.impl.osgi.loader.OSGIListener
- All Implemented Interfaces:
EventListener
,org.osgi.framework.BundleActivator
,org.osgi.framework.BundleListener
,org.osgi.framework.SynchronousBundleListener
public class OSGIListener
extends Object
implements org.osgi.framework.BundleActivator, org.osgi.framework.SynchronousBundleListener
OSGi class that monitors which bundles provide classes that the ORB
needs to instantiate for initialization.
Note that OSGIListener must be a Bundle-Activator in the glassfish-corba-orb bundle.
Any bundle that provides ORB classes to the ORB initialization code must declare all such classes in a comma-separated list in the bundle manifest with the keywork ORB-Class-Provider.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ClassCodeBaseHandler
private static final ReadWriteLock
private static final String
private static org.osgi.service.packageadmin.PackageAdmin
private static final ORBUtilSystemException
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bundleChanged
(org.osgi.framework.BundleEvent event) static ClassCodeBaseHandler
private void
private void
foundClassInBundle
(String arg, String name) private static String
getBundleEventType
(int type) private static org.osgi.framework.Bundle
getBundleForClass
(String className) private void
insertBundlePackage
(String pname, String bname) private void
insertClasses
(org.osgi.framework.Bundle bundle) private void
insertOrbProvider
(String cname, String bname) private void
private void
receivedBundleEvent
(String type, String name) private void
removeBundlePackage
(String pname, String bname) private void
removeClasses
(org.osgi.framework.Bundle bundle) private void
removeOrbProvider
(String cname, String bname) private static Dictionary
secureGetHeaders
(org.osgi.framework.Bundle bundle) private static Class
<?> secureLoadClass
(org.osgi.framework.Bundle bundle, String className) private static void
setPackageAdmin
(org.osgi.service.packageadmin.PackageAdmin pa) void
start
(org.osgi.framework.BundleContext context) void
stop
(org.osgi.framework.BundleContext context)
-
Field Details
-
lock
-
wrapper
-
ORB_PROVIDER_KEY
- See Also:
-
pkgAdmin
private static org.osgi.service.packageadmin.PackageAdmin pkgAdmin -
classNameMap
-
packageNameMap
-
classNameResolver
-
ccbHandler
-
-
Constructor Details
-
OSGIListener
public OSGIListener()
-
-
Method Details
-
setPackageAdmin
private static void setPackageAdmin(org.osgi.service.packageadmin.PackageAdmin pa) -
secureGetHeaders
-
secureLoadClass
private static Class<?> secureLoadClass(org.osgi.framework.Bundle bundle, String className) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
getBundleEventType
-
classNotFoundInBundle
-
foundClassInBundle
-
classNameResolver
-
classCodeBaseHandler
-
insertOrbProvider
-
insertBundlePackage
-
insertClasses
private void insertClasses(org.osgi.framework.Bundle bundle) -
removeOrbProvider
-
removeBundlePackage
-
removeClasses
private void removeClasses(org.osgi.framework.Bundle bundle) -
getBundleForClass
-
probeBundlesForProviders
@InfoMethod private void probeBundlesForProviders() -
start
public void start(org.osgi.framework.BundleContext context) - Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
-
stop
public void stop(org.osgi.framework.BundleContext context) - Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
-
receivedBundleEvent
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event) - Specified by:
bundleChanged
in interfaceorg.osgi.framework.BundleListener
-