mil.dod.th.junit4.test.runner/src/mil/dod/th/ose/junit4xmltestrunner/IntegrationTestLauncher.java
private BundleTracker<Object> createSystemBundleTracker(final BundleContext context)
    {
        return new BundleTracker<Object>(context, Bundle.ACTIVE, new BundleTrackerCustomizer<Object>()
        {
            @Override
            public void removedBundle(final Bundle bundle, final BundleEvent event, final Object object)
            {
                // nothing needs to be done if bundle is removed
            }
            
            @Override
            public void modifiedBundle(final Bundle bundle, final BundleEvent event, final Object object)
            {
                // nothing needs to be done if bundle is removed
            }
            
            @Override
            public Object addingBundle(final Bundle bundle, final BundleEvent event)
            {
                if (bundle.equals(m_SystemBundle))
                {
                    m_SystemInitWaitSem.release();
                    m_LogService.log(LogService.LOG_INFO, 
                         String.format("System bundle started, released semaphore [%s] to trigger test runner thread", 
                                 m_SystemInitWaitSem));
                }
                
                return null;
            }
        });
    }
/**
     * Creates a bundle tracker for the system bundle.
     * 
     * @param context
     *      bundle context reference
     * @return
     *      system bundle tracker
     */
Creates a bundle tracker for the system bundle.

@param context
bundle context reference
@return
system bundle tracker
Creates a bundle tracker for the system bundle . @param context bundle context reference @return system bundle tracker
private BundleTracker<Object> createSystemBundleTracker(final BundleContext context)
    {
        return new BundleTracker<Object>(context, Bundle.ACTIVE, new BundleTrackerCustomizer<Object>()
        {
            @Override
            public void removedBundle(final Bundle bundle, final BundleEvent event, final Object object)
            {
            }
            @Override
            public void modifiedBundle(final Bundle bundle, final BundleEvent event, final Object object)
            {
            }
            @Override
            public Object addingBundle(final Bundle bundle, final BundleEvent event)
            {
                if (bundle.equals(m_SystemBundle))
                {
                    m_SystemInitWaitSem.release();
                    m_LogService.log(LogService.LOG_INFO, 
                         String.format("System bundle started, released semaphore [%s] to trigger test runner thread", 
                                 m_SystemInitWaitSem));
                }
                return null;
            }
        });
    }
private BundleTracker < Object > createSystemBundleTracker ( final BundleContext context ) { return new BundleTracker < Object > ( context , Bundle . ACTIVE , new BundleTrackerCustomizer < Object > ( ) { @ Override public void removedBundle ( final Bundle bundle , final BundleEvent event , final Object object ) { } @ Override public void modifiedBundle ( final Bundle bundle , final BundleEvent event , final Object object ) { } @ Override public Object addingBundle ( final Bundle bundle , final BundleEvent event ) { if ( bundle . equals ( m_SystemBundle ) ) { m_SystemInitWaitSem . release ( ) ; m_LogService . log ( LogService . LOG_INFO , String . format ( "System bundle started, released semaphore [%s] to trigger test runner thread" , m_SystemInitWaitSem ) ) ; } return null ; } } ) ; }
Creates a bundle tracker for the system bundle.
Creates a bundle tracker for the system bundle .
// nothing needs to be done if bundle is removed // nothing needs to be done if bundle is removed