Examples of FortressServiceManager


Examples of org.apache.avalon.fortress.impl.lookup.FortressServiceManager

        super( name );
    }

    public void testServiceManager() throws Exception
    {
        FortressServiceManager manager = new FortressServiceManager( m_container, null );

        m_container.setExpectedKey( Role1.ROLE );

        assertTrue( manager.hasService( Role1.ROLE ) );
        assertNotNull( manager.lookup( Role1.ROLE ) );

        String hint = "test";
        m_container.setExpectedHint( hint );
        assertTrue( manager.hasService( Role1.ROLE + "/" + hint ) );
        assertNotNull( manager.lookup( Role1.ROLE + "/" + hint ) );

        m_container.setExpectedHint( AbstractContainer.SELECTOR_ENTRY );
        assertTrue( manager.hasService( Role1.ROLE + "Selector" ) );
        assertNotNull( manager.lookup( Role1.ROLE + "Selector" ) );

        ServiceSelector selector = (ServiceSelector) manager.lookup( Role1.ROLE + "Selector" );
        m_container.setExpectedHint( hint );
        assertTrue( selector.isSelectable( hint ) );
        assertNotNull( selector.select( hint ) );
    }
View Full Code Here

Examples of org.apache.avalon.fortress.impl.lookup.FortressServiceManager

     * services.
     */
    protected ServiceManager provideServiceManager( final ServiceManager parent )
            throws ServiceException
    {
        return new FortressServiceManager( this, parent );
    }
View Full Code Here

Examples of org.apache.avalon.fortress.impl.lookup.FortressServiceManager

        super( name );
    }

    public void testServiceManager() throws Exception
    {
        FortressServiceManager manager = new FortressServiceManager( m_container, null );

        m_container.setExpectedKey( Role1.ROLE );

        assertTrue( manager.hasService( Role1.ROLE ) );
        assertNotNull( manager.lookup( Role1.ROLE ) );

        String hint = "test";
        m_container.setExpectedHint( hint );
        assertTrue( manager.hasService( Role1.ROLE + "/" + hint ) );
        assertNotNull( manager.lookup( Role1.ROLE + "/" + hint ) );

        m_container.setExpectedHint( AbstractContainer.SELECTOR_ENTRY );
        assertTrue( manager.hasService( Role1.ROLE + "Selector" ) );
        assertNotNull( manager.lookup( Role1.ROLE + "Selector" ) );

        ServiceSelector selector = (ServiceSelector) manager.lookup( Role1.ROLE + "Selector" );
        m_container.setExpectedHint( hint );
        assertTrue( selector.isSelectable( hint ) );
        assertNotNull( selector.select( hint ) );
    }
View Full Code Here

Examples of org.apache.avalon.fortress.impl.lookup.FortressServiceManager

     * services.
     */
    protected ServiceManager provideServiceManager( final ServiceManager parent )
            throws ServiceException
    {
        return new FortressServiceManager( this, parent );
    }
View Full Code Here

Examples of org.apache.avalon.fortress.impl.lookup.FortressServiceManager

     * services.
     */
    protected ServiceManager provideServiceManager( final ServiceManager parent )
            throws ServiceException
    {
        return new FortressServiceManager( this, parent );
    }
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.