Package org.apache.avalon.fortress.impl.lookup

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


        assertNotNull( selector.select( hint ) );
    }

    public void testServiceSelector() throws Exception
    {
        FortressServiceSelector selector = new FortressServiceSelector( m_container, Role1.ROLE );

        m_container.setExpectedKey( Role1.ROLE );

        String hint = "test";
        m_container.setExpectedHint( hint );
        assertTrue( selector.isSelectable( hint ) );
        assertNotNull( selector.select( hint ) );
    }
View Full Code Here


    }

    public void setExpectedKey( String key )
    {
        m_key = key;
        m_selector = new FortressServiceSelector( this, m_key );
    }
View Full Code Here

    protected void processSelector(String role, Configuration config)
        throws ConfigurationException
    {
        final String selectorRole = role + "Selector";
        FortressServiceSelector fss = new FortressServiceSelector(this, selectorRole);
        Map hintMap = createHintMap();
        hintMap.put( DEFAULT_ENTRY, fss );
        hintMap.put( SELECTOR_ENTRY,
                    new FortressServiceSelector( this, selectorRole ) );
        m_mapper.put( selectorRole, hintMap );

        final Configuration[] children = config.getChildren();
        if ( children != null )
        {
View Full Code Here

            if ( null == hintMap )
            {
                hintMap = createHintMap();
                hintMap.put( DEFAULT_ENTRY, handler );
                hintMap.put( SELECTOR_ENTRY,
                        new FortressServiceSelector( this, role ) );
                m_mapper.put( role, hintMap );
            }

            hintMap.put( hint, handler );
View Full Code Here

                if ( null == hintMap )
                {
                    hintMap = createHintMap();
                    hintMap.put( DEFAULT_ENTRY, handler );
                    hintMap.put( SELECTOR_ENTRY,
                            new FortressServiceSelector( this, role ) );
                    m_mapper.put( role, hintMap );
                }

                hintMap.put( metaData.getName(), handler );
View Full Code Here

        assertNotNull( selector.select( hint ) );
    }

    public void testServiceSelector() throws Exception
    {
        FortressServiceSelector selector = new FortressServiceSelector( m_container, Role1.ROLE );

        m_container.setExpectedKey( Role1.ROLE );

        String hint = "test";
        m_container.setExpectedHint( hint );
        assertTrue( selector.isSelectable( hint ) );
        assertNotNull( selector.select( hint ) );
    }
View Full Code Here

    }

    public void setExpectedKey( String key )
    {
        m_key = key;
        m_selector = new FortressServiceSelector( this, m_key );
    }
View Full Code Here

    protected void processSelector(String role, Configuration config)
        throws ConfigurationException
    {
        final String selectorRole = role + "Selector";
        FortressServiceSelector fss = new FortressServiceSelector(this, selectorRole);
        Map hintMap = createHintMap();
        hintMap.put( DEFAULT_ENTRY, fss );
        hintMap.put( SELECTOR_ENTRY,
                    new FortressServiceSelector( this, selectorRole ) );
        m_mapper.put( selectorRole, hintMap );

        final Configuration[] children = config.getChildren();
        if ( children != null )
        {
View Full Code Here

            if ( null == hintMap )
            {
                hintMap = createHintMap();
                hintMap.put( DEFAULT_ENTRY, handler );
                hintMap.put( SELECTOR_ENTRY,
                        new FortressServiceSelector( this, role ) );
                m_mapper.put( role, hintMap );
            }

            hintMap.put( hint, handler );
View Full Code Here

                if ( null == hintMap )
                {
                    hintMap = createHintMap();
                    hintMap.put( DEFAULT_ENTRY, handler );
                    hintMap.put( SELECTOR_ENTRY,
                            new FortressServiceSelector( this, role ) );
                    m_mapper.put( role, hintMap );
                }

                hintMap.put( metaData.getName(), handler );
View Full Code Here

TOP

Related Classes of org.apache.avalon.fortress.impl.lookup.FortressServiceSelector

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.