Package org.apache.felix.scr.impl.manager

Examples of org.apache.felix.scr.impl.manager.RefPair


            }
        };
        SingleComponentManager icm = new SingleComponentManager( null, null, metadata, new ComponentMethods() );
        BindMethod bm = new BindMethod( methodName, component.getClass(),
                FakeService.class.getName(), isDS11, false );
        RefPair refPair = new RefPair( m_serviceReference );
        assertTrue( bm.getServiceObject( refPair, m_context, icm ) );
        bm.invoke( component, refPair, null, icm );
        assertEquals( expectCallPerformed, component.callPerformed );
    }
View Full Code Here


    {
        ComponentContainer container = newContainer();
        SingleComponentManager icm = new SingleComponentManager( container, new ComponentMethods() );
        BindMethod bm = new BindMethod( methodName, component.getClass(),
                FakeService.class.getName(), dsVersion, false, ReferenceMetadata.ReferenceScope.bundle );
        RefPair refPair = new SingleRefPair( m_serviceReference );
        ComponentContextImpl<T1> cc = new ComponentContextImpl(icm, null);
        assertTrue( bm.getServiceObject( cc, refPair, m_context, icm ) );
        BindParameters bp = new BindParameters(cc, refPair);
        bm.invoke( component, bp, null, icm );
        assertEquals( expectCallPerformed, component.callPerformed );
View Full Code Here

        return true;
    }

    protected Object[] getParameters( Method method, Object rawParameter )
    {
        RefPair refPair = ( RefPair ) rawParameter;
        if (m_paramStyle == SERVICE_REFERENCE )
        {
            return new Object[] {refPair.getRef()};
        }
        if (m_paramStyle == SERVICE_OBJECT)
        {
            return new Object[] {refPair.getServiceObject()};
        }
        if (m_paramStyle == SERVICE_OBJECT_AND_MAP  )
        {
            return new Object[] {refPair.getServiceObject(), new ReadOnlyDictionary( refPair.getRef() )};
        }
        throw new IllegalStateException( "Unexpected m_paramStyle of " + m_paramStyle );
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.scr.impl.manager.RefPair

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.