Package org.apache.felix.ipojo.extender

Examples of org.apache.felix.ipojo.extender.InstanceDeclaration.unbind()


                // Handle visibility (private/public factories)
                if (!m_declaration.isPublic()) {
                    if (!reference.getBundle().equals(m_bundleContext.getBundle())) {
                        Bundle origin = m_bundleContext.getBundle();
                        instanceDeclaration.unbind(
                                format("Component '%s/%s' is private. It only accept instances " +
                                               "from bundle %s/%s [%d] (instance bundle origin: %d)",
                                       m_declaration.getComponentName(),
                                       m_declaration.getComponentVersion(),
                                       origin.getSymbolicName(),
View Full Code Here


                            // Notify the declaration that everything is fine
                            instanceDeclaration.bind();

                            return instance;
                        } catch (UnacceptableConfiguration c) {
                            instanceDeclaration.unbind(format("Instance configuration is invalid (component:%s/%s, bundle:%d)",
                                                              m_declaration.getComponentName(),
                                                              m_declaration.getComponentVersion(),
                                                              reference.getBundle().getBundleId()),
                                    c);
                        } catch (MissingHandlerException e) {
View Full Code Here

                                                              m_declaration.getComponentName(),
                                                              m_declaration.getComponentVersion(),
                                                              reference.getBundle().getBundleId()),
                                    c);
                        } catch (MissingHandlerException e) {
                            instanceDeclaration.unbind(
                                    format(
                                            "Component '%s/%s' (required for instance creation) is missing some handlers",
                                            m_declaration.getComponentName(),
                                            m_declaration.getComponentVersion()
                                    ),
View Full Code Here

                                            m_declaration.getComponentName(),
                                            m_declaration.getComponentVersion()
                                    ),
                                    e);
                        } catch (ConfigurationException e) {
                            instanceDeclaration.unbind(
                                    format(
                                            "Instance configuration is incorrect for component '%s/%s'",
                                            m_declaration.getComponentName(),
                                            m_declaration.getComponentVersion()),
                                    e);
View Full Code Here

                // It is possible that the instance couldn't be created
                if (instance != null) {
                    String message = format("Factory for Component '%s/%s' is missing",
                                            instance.getFactory().getName(),
                                            m_declaration.getComponentVersion());
                    instanceDeclaration.unbind(message);

                    instance.stop();
                    instance.dispose();
                }
View Full Code Here

                    instance.stop();
                    instance.dispose();
                }

            } catch (InterruptedException e) {
                instanceDeclaration.unbind("Could not create ComponentInstance", e);
            } catch (ExecutionException e) {
                instanceDeclaration.unbind("ComponentInstance creation throw an Exception", e);
            }
        }
    }
View Full Code Here

                }

            } catch (InterruptedException e) {
                instanceDeclaration.unbind("Could not create ComponentInstance", e);
            } catch (ExecutionException e) {
                instanceDeclaration.unbind("ComponentInstance creation throw an Exception", e);
            }
        }
    }

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.