Package org.apache.avalon.fortress.util

Examples of org.apache.avalon.fortress.util.LifecycleExtensionManager


    return metaManager;
  }

  protected LifecycleExtensionManager createLifeCycleExtensionManager(DefaultContext c)
  {
    LifecycleExtensionManager extensions = new LifecycleExtensionManager();
    Accessor accessor = new AuthorizationLifecycleAccessExtension();

    if (accessor instanceof LogEnabled)
    {
      ((LogEnabled) accessor).enableLogging(getLogger());
    }

    extensions.addAccessorExtension(accessor);

    Creator creator = new AuthorizationLifecycleCreateExtension();

    if (creator instanceof LogEnabled)
    {
      ((LogEnabled) creator).enableLogging(getLogger());
    }

    extensions.addCreatorExtension(creator);

    return extensions;
  }
View Full Code Here


    return metaManager;
  }

  protected LifecycleExtensionManager createLifeCycleExtensionManager(DefaultContext c)
  {
    LifecycleExtensionManager extensions = new LifecycleExtensionManager();

    Accessor accessor = new AuthorizationLifecycleAccessExtension();

    if (accessor instanceof LogEnabled)
    {
      ((LogEnabled) accessor).enableLogging(getLogger());
    }

    extensions.addAccessorExtension(accessor);

    Creator creator = new AuthorizationLifecycleCreateExtension();

    if (creator instanceof LogEnabled)
    {
      ((LogEnabled) creator).enableLogging(getLogger());
    }

    extensions.addCreatorExtension(creator);

    return extensions;
  }
View Full Code Here

        ContainerUtil.dispose( cm );
    }

    private static void setupExtensions( FortressConfig config )
    {
        LifecycleExtensionManager extensions = new LifecycleExtensionManager();
        extensions.enableLogging(new NullLogger());
        extensions.addAccessorExtension( new Extensions() );

        config.setLifecycleExtensionManager(extensions);
    }
View Full Code Here

        super( name );
    }

    public void setUp()
    {
        m_manager = new LifecycleExtensionManager();
        m_manager.enableLogging(new NullLogger());
    }
View Full Code Here

        m_config = new FortressConfig( FortressConfig.createDefaultConfig() );
        m_config.setCommandSink( new CommandSink(commands) );
        m_config.setContextClassLoader( FortressConfigTestCase.class.getClassLoader() );
        m_config.setInstrumentManager( new TestInstrumentManager() );
        m_config.setLifecycleExtensionManager( new LifecycleExtensionManager() );
        m_config.setLoggerCategory( "test" );
        m_config.setLoggerManager( new DefaultLoggerManager() );
        m_config.setNumberOfThreadsPerCPU( 10 );
        m_config.setPoolManager( new DefaultPoolManager(commands) );
        m_config.setRoleManager( new FortressRoleManager() );
View Full Code Here

    {
        final Logger extLogger = m_loggerManager.getLoggerForCategory( "system.extensions" );

        if ( serviceManager.hasService( LifecycleExtensionManager.ROLE ) )
        {
            final LifecycleExtensionManager parent = (LifecycleExtensionManager)
                    serviceManager.lookup( LifecycleExtensionManager.ROLE );

            if ( extLogger.isDebugEnabled() )
            {
                final String message = "Found the LifecycleExtensionManager, creating a copy.";
                extLogger.debug( message );
            }

            m_extManager = parent.writeableCopy();
        }
        else
        {
            if ( extLogger.isDebugEnabled() )
            {
                final String message = "No LifecycleExtensionManager found, creating a new one.";
                extLogger.debug( message );
            }

            m_extManager = new LifecycleExtensionManager();
        }

        /** LifecycleExtensionManager.writeableCopy() does not copy the logger. */
        m_extManager.enableLogging( extLogger );

View Full Code Here

        ContainerUtil.dispose( cm );
    }

    private static void setupExtensions( FortressConfig config )
    {
        LifecycleExtensionManager extensions = new LifecycleExtensionManager();
        extensions.enableLogging(new NullLogger());
        extensions.addAccessorExtension( new Extensions() );

        config.setLifecycleExtensionManager(extensions);
    }
View Full Code Here

    {
        m_config = new FortressConfig( FortressConfig.createDefaultConfig() );
        m_config.setCommandSink( new DefaultQueue() );
        m_config.setContextClassLoader( FortressConfigTestCase.class.getClassLoader() );
        m_config.setInstrumentManager( new TestInstrumentManager() );
        m_config.setLifecycleExtensionManager( new LifecycleExtensionManager() );
        m_config.setLoggerCategory( "test" );
        m_config.setLoggerManager( new DefaultLoggerManager() );
        m_config.setNumberOfThreadsPerCPU( 10 );
        m_config.setPoolManager( new DefaultPoolManager() );
        m_config.setRoleManager( new FortressRoleManager() );
View Full Code Here

        super( name );
    }

    public void setUp()
    {
        m_manager = new LifecycleExtensionManager();
        m_manager.enableLogging(new NullLogger());
    }
View Full Code Here

    {
        final Logger extLogger = m_loggerManager.getLoggerForCategory( "system.extensions" );

        if ( serviceManager.hasService( LifecycleExtensionManager.ROLE ) )
        {
            final LifecycleExtensionManager parent = (LifecycleExtensionManager)
                    serviceManager.lookup( LifecycleExtensionManager.ROLE );

            if ( extLogger.isDebugEnabled() )
            {
                final String message = "Found the LifecycleExtensionManager, creating a copy.";
                extLogger.debug( message );
            }

            m_extManager = parent.writeableCopy();
        }
        else
        {
            if ( extLogger.isDebugEnabled() )
            {
                final String message = "No LifecycleExtensionManager found, creating a new one.";
                extLogger.debug( message );
            }

            m_extManager = new LifecycleExtensionManager();
        }

        /** LifecycleExtensionManager.writeableCopy() does not copy the logger. */
        m_extManager.enableLogging( extLogger );

View Full Code Here

TOP

Related Classes of org.apache.avalon.fortress.util.LifecycleExtensionManager

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.