Examples of FrameworkEvent


Examples of org.osgi.framework.FrameworkEvent

     * Fires bundle events.
    **/
    void fireFrameworkEvent(
        int type, Bundle bundle, Throwable throwable)
    {
        m_dispatcher.fireFrameworkEvent(new FrameworkEvent(type, bundle, throwable));
    }
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

    public void awaitShutdown() throws Exception {
        if (framework == null) {
            return;
        }
        while (true) {
            FrameworkEvent event = framework.waitForStop(0);
            if (event.getType() != FrameworkEvent.STOPPED_UPDATE) {
                return;
            }
        }
    }
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

            while (timeout > 0) {
                timeout -= step;
                if (shutdownCallback != null) {
                    shutdownCallback.waitingForShutdown(step * 2);
                }
                FrameworkEvent event = framework.waitForStop(step);
                if (event.getType() != FrameworkEvent.WAIT_TIMEDOUT) {
                    activatorManager.stopKarafActivators();
                    return true;
                }
            }
            return false;
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

                        {
                            dispatcher.m_logger.log(bundle,
                                Logger.LOG_ERROR,
                                "EventDispatcher: Error during dispatch.", th);
                            dispatcher.fireFrameworkEvent(
                                new FrameworkEvent(FrameworkEvent.ERROR, bundle, th));
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

        }.start();
    }

    public void awaitShutdown() throws Exception {
        while (true) {
            FrameworkEvent event = framework.waitForStop(0);
            if (event.getType() != FrameworkEvent.STOPPED_UPDATE) {
                return;
            }
        }
    }
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

            while (timeout > 0) {
                timeout -= step;
                if (shutdownCallback != null) {
                    shutdownCallback.waitingForShutdown(step * 2);
                }
                FrameworkEvent event = framework.waitForStop(step);
                if (event.getType() != FrameworkEvent.WAIT_TIMEDOUT) {
                    return true;
                }
            }
            return false;
        } finally {
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

                return bundleLocation;
            }
        });

        BundleEvent bundleEvent = new BundleEvent(BundleEvent.INSTALLED, testBundleA);
        FrameworkEvent frameworkEvent = new FrameworkEvent(FrameworkEvent.INFO, testBundleA, new IllegalStateException());

        listeners.bundleChanged(bundleEvent);
        listeners.frameworkEvent(frameworkEvent);
        listeners.stopInternal();
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

    public void awaitShutdown() throws Exception {
        if (framework == null) {
            return;
        }
        while (true) {
            FrameworkEvent event = framework.waitForStop(0);
            if (event.getType() != FrameworkEvent.STOPPED_UPDATE) {
                return;
            }
        }
    }
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

            while (timeout > 0) {
                timeout -= step;
                if (shutdownCallback != null) {
                    shutdownCallback.waitingForShutdown(step * 2);
                }
                FrameworkEvent event = framework.waitForStop(step);
                if (event.getType() != FrameworkEvent.WAIT_TIMEDOUT) {
                    return true;
                }
            }
            return false;
        } finally {
View Full Code Here

Examples of org.osgi.framework.FrameworkEvent

        int startLevel = bundleContext.getBundle(0).adapt(FrameworkStartLevel.class).getStartLevel();
        if (startLevel >= defaultStartLevel) {
            started.set(true);
        } else {
            bundleContext.addFrameworkListener(this);
            frameworkEvent(new FrameworkEvent(FrameworkEvent.STARTLEVEL_CHANGED, bundleContext.getBundle(), null));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.