Package org.apache.excalibur.instrument

Examples of org.apache.excalibur.instrument.InstrumentManager


        {
            //Creation stage
            stage = STAGE_CREATE;
            notice( name, stage );
            final Object object = provider.createObject( entry );
            final InstrumentManager instrumentManager = provider.createInstrumentManager(
                entry );

            //LogEnabled stage
            stage = STAGE_LOGGER;
            if( object instanceof LogEnabled )
            {
                notice( name, stage );
                final Logger logger = provider.createLogger( entry );
                ContainerUtil.enableLogging( object, logger );
            }

            //InstrumentManageable stage
            stage = STAGE_INSTRUMENTMGR;
            if( object instanceof InstrumentManageable )
            {
                notice( name, stage );

                ( (InstrumentManageable)object ).setInstrumentManager(
                    instrumentManager );
            }

            //Contextualize stage
            stage = STAGE_CONTEXT;
            if( object instanceof Contextualizable )
            {
                notice( name, stage );
                final Context context = provider.createContext( entry );
                ContainerUtil.contextualize( object, context );
            }

            //Composition stage
            stage = STAGE_COMPOSE;
            if( object instanceof Serviceable )
            {
                notice( name, stage );
                final ServiceManager manager =
                    provider.createServiceManager( entry );
                ContainerUtil.service( object, manager );
            }
            else if( object instanceof Composable )
            {
                notice( name, stage );
                final ComponentManager componentManager =
                    provider.createComponentManager( entry );
                ContainerUtil.compose( object, componentManager );
            }

            //Configuring stage
            stage = STAGE_CONFIG;
            if( object instanceof Configurable )
            {
                notice( name, stage );
                final Configuration configuration =
                    provider.createConfiguration( entry );
                ContainerUtil.configure( object, configuration );
            }

            //Parameterizing stage
            stage = STAGE_PARAMETER;
            if( object instanceof Parameterizable )
            {
                notice( name, stage );
                final Parameters parameters =
                    provider.createParameters( entry );
                ContainerUtil.parameterize( object, parameters );
            }

            //Initialize stage
            stage = STAGE_INIT;
            if( object instanceof Initializable )
            {
                notice( name, stage );
                ContainerUtil.initialize( object );
            }

            //InstrumentManageable stage
            stage = STAGE_INSTRUMENTABLE;
            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
            stage = STAGE_START;
View Full Code Here


        assertNotNull( managerContext );

        final ServiceManager serviceManager = (ServiceManager) managerContext.get( SERVICE_MANAGER );
        assertNotNull( serviceManager );

        final InstrumentManager instrumentManager =
                (InstrumentManager) serviceManager.lookup( InstrumentManager.ROLE );
        assertNotNull( instrumentManager );
        assertSame( m_instrManager, instrumentManager );
    }
View Full Code Here

            throw new IllegalStateException(
                "The ExcaliburComponentManagerServlet servlet was not correctly initialized." );
        }

        // Register this servlet with the InstrumentManager if it exists.
        InstrumentManager instrumentManager =
            (InstrumentManager)context.getAttribute( InstrumentManager.class.getName() );
        if( instrumentManager != null )
        {
            try
            {
                instrumentManager.registerInstrumentable(
                    this, "servlets." + getInstrumentableName() );
            }
            catch( Exception e )
            {
                throw new ServletException(
View Full Code Here

            throw new IllegalStateException(
                "The ExcaliburComponentManagerServlet servlet was not correctly initialized." );
        }

        // Register this servlet with the InstrumentManager if it exists.
        InstrumentManager instrumentManager =
            (InstrumentManager)context.getAttribute( InstrumentManager.class.getName() );
        if ( instrumentManager != null )
        {
            try
            {
                instrumentManager.registerInstrumentable(
                    this, "servlets." + getInstrumentableName() );
            }
            catch ( Exception e )
            {
                throw new ServletException(
View Full Code Here

        assertNotNull( managerContext );

        final ServiceManager serviceManager = (ServiceManager) managerContext.get( SERVICE_MANAGER );
        assertNotNull( serviceManager );

        final InstrumentManager instrumentManager =
                (InstrumentManager) serviceManager.lookup( InstrumentManager.ROLE );
        assertNotNull( instrumentManager );
        assertSame( m_instrManager, instrumentManager );
    }
View Full Code Here

            throw new IllegalStateException(
                "The ExcaliburComponentManagerServlet servlet was not correctly initialized." );
        }

        // Register this servlet with the InstrumentManager if it exists.
        InstrumentManager instrumentManager =
            (InstrumentManager)context.getAttribute( InstrumentManager.class.getName() );
        if( instrumentManager != null )
        {
            try
            {
                instrumentManager.registerInstrumentable(
                    this, "servlets." + getInstrumentableName() );
            }
            catch( Exception e )
            {
                throw new ServletException(
View Full Code Here

            throw new IllegalStateException(
                "The ExcaliburComponentManagerServlet servlet was not correctly initialized." );
        }

        // Register this servlet with the InstrumentManager if it exists.
        InstrumentManager instrumentManager =
            (InstrumentManager)context.getAttribute( InstrumentManager.class.getName() );
        if ( instrumentManager != null )
        {
            try
            {
                instrumentManager.registerInstrumentable(
                    this, "servlets." + getInstrumentableName() );
            }
            catch ( Exception e )
            {
                throw new ServletException(
View Full Code Here

TOP

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

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.