Package org.apache.felix.ipojo.util

Examples of org.apache.felix.ipojo.util.Logger


    public InstanceManager(ComponentFactory factory, BundleContext context, HandlerManager[] handlers) {
        m_factory = factory;
        m_context = context;
        m_handlers = handlers;
        m_description = new PrimitiveInstanceDescription(m_factory.getComponentDescription(), this);
        m_logger = new Logger(m_context, this);
    }
View Full Code Here


        m_context = context;
        // Initialize the service context.
        m_internalContext = new CompositeServiceContext(m_context, this);
        m_handlers = handlers;
        m_description = new CompositeInstanceDescription(m_factory.getComponentDescription(), this);
        m_logger = new Logger(m_context, this);

    }
View Full Code Here

        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);

        DependencyHandler handler = (DependencyHandler) Mockito.mock(DependencyHandler.class);
        Mockito.when(handler.getInstanceManager()).thenReturn(im);
        Logger logger = new Logger(context, "test", Logger.INFO);


        Mockito.when(handler.getLogger()).thenReturn(logger);

        // Try with java.List
View Full Code Here

        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);

        DependencyHandler handler = (DependencyHandler) Mockito.mock(DependencyHandler.class);
        Mockito.when(handler.getInstanceManager()).thenReturn(im);
        Logger logger = new Logger(context, "test", Logger.INFO);


        Mockito.when(handler.getLogger()).thenReturn(logger);

        // Try with java.List
View Full Code Here

        Mockito.when(context.getProperty(Logger.IPOJO_LOG_LEVEL_PROP)).thenReturn(null);
        Mockito.when(context.getBundle()).thenReturn(new MockBundle(this.getClass().getClassLoader()));

        factory = (ComponentFactory) Mockito.mock(ComponentFactory.class);
        Mockito.when(factory.getBundleClassLoader()).thenReturn(ProvidedServiceHandler.class.getClassLoader());
        Mockito.when(factory.getLogger()).thenReturn(new Logger(context, "TEST", Logger.INFO));

        im = (InstanceManager) Mockito.mock(InstanceManager.class);
        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getFactory()).thenReturn(factory);
View Full Code Here

    public InstanceManager(ComponentFactory factory, BundleContext context, HandlerManager[] handlers) {
        m_factory = factory;
        m_context = context;
        m_handlers = handlers;
        m_description = new PrimitiveInstanceDescription(m_factory.getComponentDescription(), this);
        m_logger = new Logger(m_context, this);
    }
View Full Code Here

     */
    public void start(BundleContext context) throws Exception {
        m_context = context;
        m_bundle = context.getBundle();

        m_logger = new Logger(m_context, "IPOJO-Main-Extender");

        enablingDispatcher(context, m_logger);
        enablingSynchronousProcessing(context, m_logger);

        // Create the dispatcher only if required.
View Full Code Here

        m_context = context;
        m_componentMetadata = metadata;
        m_factoryName = getFactoryName();
        String fac = metadata.getAttribute("public");
        m_isPublic = fac == null || !fac.equalsIgnoreCase("false");
        m_logger = new Logger(m_context, m_factoryName);

        // Compute the component type version.
        String version = metadata.getAttribute("version");
        if ("bundle".equalsIgnoreCase(version)) { // Handle the "bundle" constant: use the bundle version.
            // The cast is necessary in KF.
View Full Code Here

        Mockito.when(context.getProperty(Logger.IPOJO_LOG_LEVEL_PROP)).thenReturn(null);
        Mockito.when(context.getBundle()).thenReturn(new MockBundle(this.getClass().getClassLoader()));

        factory = (ComponentFactory) Mockito.mock(ComponentFactory.class);
        Mockito.when(factory.getBundleClassLoader()).thenReturn(ProvidedServiceHandler.class.getClassLoader());
        logger = Mockito.spy(new Logger(context, "TEST", Logger.INFO));
        Mockito.when(factory.getLogger()).thenReturn(logger);

        im = (InstanceManager) Mockito.mock(InstanceManager.class);
        Mockito.when(im.getContext()).thenReturn(context);
        Mockito.when(im.getGlobalContext()).thenReturn(context);
View Full Code Here

     *
     * @param context : bundle context.
     */
    public ServiceRegistry(BundleContext context) {
        m_context = context;
        m_logger = new Logger(m_context, "Registry logger " + m_context.getBundle().getBundleId());
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.util.Logger

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.