Package org.osgi.framework

Examples of org.osgi.framework.FrameworkEvent


    }
  }

  public void dumpAll() {
    for(int i = 0; i < errorList.size(); i++) {
      FrameworkEvent fe = (FrameworkEvent) errorList.get(i);
      dump(fe);
    }
  }
View Full Code Here


        }.start();
    }

    public void awaitShutdown() throws Exception {
        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

    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

                        {
                            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

        if (gate != null)
        {
            open = gate.await(timeout);
        }

        FrameworkEvent event;
        if (open && (gate.getMessage() != null))
        {
            event = (FrameworkEvent) gate.getMessage();
        }
        else if (!open && (gate != null))
        {
            event = new FrameworkEvent(FrameworkEvent.WAIT_TIMEDOUT, this, null);
        }
        else
        {
            event = new FrameworkEvent(FrameworkEvent.STOPPED, this, null);
        }
        return event;
    }
View Full Code Here

                {
                    // First acquire the system bundle lock to verify the state.
                    acquireBundleLock(Felix.this, Bundle.STARTING | Bundle.ACTIVE);
                    // Set the reason for the shutdown.
                    m_shutdownGate.setMessage(
                        new FrameworkEvent(FrameworkEvent.STOPPED_UPDATE, Felix.this, null));
                    // Record the state and stop the system bundle.
                    int oldState = Felix.this.getState();
                    try
                    {
                        stop();
View Full Code Here

        {
            fireFrameworkEvent(FrameworkEvent.STARTLEVEL_CHANGED, this, null);

            if (listeners != null)
            {
                FrameworkEvent event = new FrameworkEvent(
                    FrameworkEvent.STARTLEVEL_CHANGED, this, null);
                for (FrameworkListener l : listeners)
                {
                    try
                    {
View Full Code Here

        fireFrameworkEvent(FrameworkEvent.PACKAGES_REFRESHED, this, null);

        if (listeners != null)
        {
            FrameworkEvent event = new FrameworkEvent(
                FrameworkEvent.PACKAGES_REFRESHED, this, null);
            for (FrameworkListener l : listeners)
            {
                try
                {
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.