Package org.apache.excalibur.instrument

Examples of org.apache.excalibur.instrument.Instrumentable


        // Loop over the child Instrumentables published by this Instrumentable
        Instrumentable[] children = instrumentable.getChildInstrumentables();
        for ( int i = 0; i < children.length; i++ )
        {
            Instrumentable child = children[i];
           
            // Make sure that the child instrumentable name is set.
            String childName = child.getInstrumentableName();
            if( childName == null )
            {
                String msg = "The getInstrumentableName() method of a child Instrumentable of " +
                    instrumentableName + " returned null.  Child class: " +
                    child.getClass().getName();
                getLogger().debug( msg );
                throw new ServiceException( instrumentable.getClass().getName(), msg );
            }
           
            String fullChildName = instrumentableName + "." + childName;
View Full Code Here


            if( object instanceof Instrumentable )
            {
                notice( name, stage );
                final String instrumentableName = provider.createInstrumentableName(
                    entry );
                final Instrumentable instrumentable = (Instrumentable)object;
                instrumentable.setInstrumentableName( instrumentableName );
                instrumentManager.registerInstrumentable( instrumentable,
                                                          instrumentableName );
            }

            //Start stage
View Full Code Here

        }

        // Set the name of the instrumentable before initialization.
        if( component instanceof Instrumentable )
        {
            Instrumentable instrumentable = (Instrumentable)component;
            instrumentable.setInstrumentableName( m_instrumentableName );
        }

        if( ( component instanceof InstrumentManageable ) && ( m_instrumentManager != null ) )
        {
            ( (InstrumentManageable)component ).setInstrumentManager( m_instrumentManager );
View Full Code Here

        }

        // Set the name of the instrumentable before initialization.
        if( component instanceof Instrumentable )
        {
            Instrumentable instrumentable = (Instrumentable)component;
            instrumentable.setInstrumentableName( m_instrumentableName );
        }

        if( ( component instanceof InstrumentManageable ) && ( m_instrumentManager != null ) )
        {
            ( (InstrumentManageable)component ).setInstrumentManager( m_instrumentManager );
View Full Code Here

                    ContainerUtil.enableLogging( connector, connLogger );
                    ContainerUtil.configure( connector, connectorConf );
                    ContainerUtil.start( connector );
                    if ( connector instanceof Instrumentable )
                    {
                        Instrumentable inst = (Instrumentable)connector;
                        registerInstrumentable( inst,
                            m_instrumentableName + ".connector." + inst.getInstrumentableName() );
                    }
                   
                    m_connectors.add( connector );
                }
                catch ( Exception e )
View Full Code Here

        // Loop over the child Instrumentables published by this Instrumentable
        Instrumentable[] children = instrumentable.getChildInstrumentables();
        for ( int i = 0; i < children.length; i++ )
        {
            Instrumentable child = children[i];
           
            // Make sure that the child instrumentable name is set.
            String childName = child.getInstrumentableName();
            if( childName == null )
            {
                String msg = "The getInstrumentableName() method of a child Instrumentable of " +
                    instrumentableName + " returned null.  Child class: " +
                    child.getClass().getName();
                getLogger().debug( msg );
                throw new ServiceException( instrumentable.getClass().getName(), msg );
            }
           
            String fullChildName = instrumentableName + "." + childName;
View Full Code Here

    public void create( final Object object, final Context context ) throws Exception
    {
        if ( m_instrumentEnabled && object instanceof Instrumentable )
        {
            final String instrumentableName = (String) context.get( "component.name" );
            final Instrumentable instrumentable = (Instrumentable) object;
            instrumentable.setInstrumentableName( instrumentableName );

            // Get the name from the instrumentable in case it was changed since being set above.
            m_instrumentManager.registerInstrumentable(
                instrumentable, instrumentable.getInstrumentableName() );

        }

        if ( m_instrumentEnabled && object instanceof InstrumentManageable )
        {
View Full Code Here

            ContainerUtil.configure( targetHandler, configuration );
            ContainerUtil.initialize( targetHandler );

            if ( targetHandler instanceof Instrumentable )
            {
                final Instrumentable instrumentable = (Instrumentable) targetHandler;
                final String name = instrumentable.getInstrumentableName();
                m_instrumentManager.registerInstrumentable( instrumentable, name );
            }

            // no other lifecycle stages supported for ComponentHandler;
            // ComponentHandler is not a "true" avalon component
View Full Code Here

            ContainerUtil.configure( targetHandler, configuration );
            ContainerUtil.initialize( targetHandler );

            if ( targetHandler instanceof Instrumentable )
            {
                final Instrumentable instrumentable = (Instrumentable) targetHandler;
                final String name = instrumentable.getInstrumentableName();
                m_instrumentManager.registerInstrumentable( instrumentable, name );
            }

            // no other lifecycle stages supported for ComponentHandler;
            // ComponentHandler is not a "true" avalon component
View Full Code Here

    public void create( final Object object, final Context context ) throws Exception
    {
        if ( m_instrumentEnabled && object instanceof Instrumentable )
        {
            final String instrumentableName = (String) context.get( "component.name" );
            final Instrumentable instrumentable = (Instrumentable) object;
            instrumentable.setInstrumentableName( instrumentableName );

            // Get the name from the instrumentable in case it was changed since being set above.
            m_instrumentManager.registerInstrumentable(
                instrumentable, instrumentable.getInstrumentableName() );

        }

        if ( m_instrumentEnabled && object instanceof InstrumentManageable )
        {
View Full Code Here

TOP

Related Classes of org.apache.excalibur.instrument.Instrumentable

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.