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 classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ClassCodeBaseHandlerprivate static final ReadWriteLockprivate static final Stringprivate static org.osgi.service.packageadmin.PackageAdminprivate static final ORBUtilSystemException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbundleChanged(org.osgi.framework.BundleEvent event) static ClassCodeBaseHandlerprivate voidprivate voidfoundClassInBundle(String arg, String name) private static StringgetBundleEventType(int type) private static org.osgi.framework.BundlegetBundleForClass(String className) private voidinsertBundlePackage(String pname, String bname) private voidinsertClasses(org.osgi.framework.Bundle bundle) private voidinsertOrbProvider(String cname, String bname) private voidprivate voidreceivedBundleEvent(String type, String name) private voidremoveBundlePackage(String pname, String bname) private voidremoveClasses(org.osgi.framework.Bundle bundle) private voidremoveOrbProvider(String cname, String bname) private static DictionarysecureGetHeaders(org.osgi.framework.Bundle bundle) private static Class<?> secureLoadClass(org.osgi.framework.Bundle bundle, String className) private static voidsetPackageAdmin(org.osgi.service.packageadmin.PackageAdmin pa) voidstart(org.osgi.framework.BundleContext context) voidstop(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:
startin interfaceorg.osgi.framework.BundleActivator
-
stop
public void stop(org.osgi.framework.BundleContext context) - Specified by:
stopin interfaceorg.osgi.framework.BundleActivator
-
receivedBundleEvent
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event) - Specified by:
bundleChangedin interfaceorg.osgi.framework.BundleListener
-