Package org.osgi.framework

Examples of org.osgi.framework.FrameworkEvent


            startBootLevelServices();

            manager.loadBundles();

            manager.fireFrameworkEvent(new FrameworkEvent(FrameworkEvent.STARTED, systemBundleController, null));
        }
        catch (Exception e)
        {
            LOGGER.log(Level.SEVERE, "Framework startup exception", e);
            throw new PapooseException(e);
View Full Code Here


            doStop();

            state = new Resolved();

            futureStop.setFrameworkEvent(new FrameworkEvent(FrameworkEvent.STOPPED, systemBundleController, null));
        }
View Full Code Here

                            {
                                doStop();

                                state = new Resolved();

                                futureStop.setFrameworkEvent(new FrameworkEvent(FrameworkEvent.STOPPED, systemBundleController, null));
                            }
                            catch (Throwable throwable)
                            {
                                LOGGER.log(Level.SEVERE, "Problem stopping the framework", throwable);

                                state = new Invalid();

                                futureStop.setFrameworkEvent(new FrameworkEvent(FrameworkEvent.ERROR, systemBundleController, throwable));
                            }
                            finally
                            {
                                latch.countDown();
                            }
View Full Code Here

                        {
                            try
                            {
                                doStop();

                                futureStop.setFrameworkEvent(new FrameworkEvent(FrameworkEvent.STOPPED_UPDATE, systemBundleController, null));

                                futureStop = new FutureFrameworkEvent();

                                doStart();
                            }
                            catch (Throwable throwable)
                            {
                                LOGGER.log(Level.SEVERE, "Problem stopping and starting (updating) the framework", throwable);

                                state = new Invalid();

                                futureStop.setFrameworkEvent(new FrameworkEvent(FrameworkEvent.ERROR, systemBundleController, throwable));

                                try
                                {
                                    doStop();
                                }
View Full Code Here

    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

            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

            return;
        }
       
        if (await) {
            while (true) {
                FrameworkEvent event = framework.waitForStop(0);
                if (event.getType() != FrameworkEvent.STOPPED_UPDATE) {
                    break;
                }
            }
        }
        if (framework.getState() == Bundle.ACTIVE) {
View Full Code Here

    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

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

    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

TOP

Related Classes of org.osgi.framework.FrameworkEvent

Copyright © 2018 www.massapicom. 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.