Package org.osgi.framework

Examples of org.osgi.framework.BundleException


                bundleContext = osgiRuntime .getBundleContext();      
            }
        } catch (BundleException e) {
           throw e;
        } catch (Exception e) {
            throw new BundleException("Could not start OSGi runtime", e);
        }
       
       
        return bundleContext;
    }
View Full Code Here


        m_reg = new PojoServiceRegistryFactoryImpl()
        .newPojoServiceRegistry(new HashMap());
        m_bundle = m_reg.getBundleContext()
            .getBundle();
      } catch (Exception ex) {
        throw new BundleException("Unable to scan classpath", ex);
      }
    }
View Full Code Here

      try {
        m_reg.startBundles((m_filter != null) ? new ClasspathScanner()
          .scanForBundles(m_filter)
          : new ClasspathScanner().scanForBundles());
      } catch (Exception e) {
        throw new BundleException("Error starting framework", e);
      }
    }
View Full Code Here

        return m_reg.registerService(m_bundle, clazzes, service, properties);
    }

    public Bundle installBundle(String location) throws BundleException
    {
        throw new BundleException("pojosr can't do that");
    }
View Full Code Here

    public Bundle installBundle(String location, InputStream input)
            throws BundleException
    {

        throw new BundleException("pojosr can't do that");
    }
View Full Code Here

        {
            if (m_state == Bundle.ACTIVE)
            {
                return;
            }
            throw new BundleException("Bundle is in wrong state for start");
        }
        try
        {
            m_state = Bundle.STARTING;

            m_context = new PojoSRBundleContext(this, m_reg, m_dispatcher,
                    m_bundles, m_config);
            m_dispatcher.fireBundleEvent(new BundleEvent(BundleEvent.STARTING,
                    this));
            if (m_activatorClass != null)
            {
                m_activator = (BundleActivator) m_loader.loadClass(
                        m_activatorClass).newInstance();
                m_activator.start(m_context);
            }
            m_state = Bundle.ACTIVE;
            m_dispatcher.fireBundleEvent(new BundleEvent(BundleEvent.STARTED,
                    this));
        }
        catch (Throwable ex)
        {
            m_state = Bundle.RESOLVED;
            m_activator = null;
            m_dispatcher.fireBundleEvent(new BundleEvent(BundleEvent.STOPPED,
                    this));
            throw new BundleException("Unable to start bundle", ex);
        }
    }
View Full Code Here

        {
            if (m_state == Bundle.RESOLVED)
            {
                return;
            }
            throw new BundleException("Bundle is in wrong state for stop");
        }
        try
        {
            m_state = Bundle.STOPPING;
            m_dispatcher.fireBundleEvent(new BundleEvent(BundleEvent.STOPPING,
                    this));
            if (m_activator != null)
            {
                m_activator.stop(m_context);
            }
        }
        catch (Throwable ex)
        {
            throw new BundleException("Error while stopping bundle", ex);
        }
        finally
        {
            m_reg.unregisterServices(this);
            m_dispatcher.removeListeners(m_context);
View Full Code Here

        }
    }

    public void update(InputStream input) throws BundleException
    {
        throw new BundleException("pojosr bundles can't be updated");
    }
View Full Code Here

        throw new BundleException("pojosr bundles can't be updated");
    }

    public void update() throws BundleException
    {
        throw new BundleException("pojosr bundles can't be updated");
    }
View Full Code Here

        throw new BundleException("pojosr bundles can't be updated");
    }

    public void uninstall() throws BundleException
    {
        throw new BundleException("pojosr bundles can't be uninstalled");
    }
View Full Code Here

TOP

Related Classes of org.osgi.framework.BundleException

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.