mil.dod.th.ose.config/src/mil/dod/th/ose/config/loading/impl/FactoryObjectLoaderImpl.java
@Activate
    public void activate(final BundleContext context)
    {
        m_BundleContext = context;
        m_ServiceTrackerList = new ArrayList<ServiceTracker<FactoryDescriptor, FactoryDescriptor>>();

        // Create an event handler to wait for all factory objects to be loaded
        final EventHandler eventHandler = new EventHandler()
        {
            private int m_FactoryObjCount;

            @Override
            public void handleEvent(final Event event)
            {
                m_FactoryObjCount++;
                if (m_FactoryObjCount == m_NumServiceTrackersCreated)
                {
                    sendConfigFactoryObjCompleteEvent();
                }
            }
        };

        final Dictionary<String, Object> props = new Hashtable<String, Object>();
        props.put(EventConstants.EVENT_TOPIC, ConfigLoadingConstants.TOPIC_CONFIG_FACTORY_OBJ_LOADED_EVENT);
        m_EventHandlerReg = m_BundleContext.registerService(EventHandler.class, eventHandler, props);
    }
/**
     * The service component activation method.
     * 
     * @param context
     *            context for the bundle
     */
The service component activation method.

@param context
context for the bundle
The service component activation method . @param context context for the bundle
@Activate
    public void activate(final BundleContext context)
    {
        m_BundleContext = context;
        m_ServiceTrackerList = new ArrayList<ServiceTracker<FactoryDescriptor, FactoryDescriptor>>();
        final EventHandler eventHandler = new EventHandler()
        {
            private int m_FactoryObjCount;
            @Override
            public void handleEvent(final Event event)
            {
                m_FactoryObjCount++;
                if (m_FactoryObjCount == m_NumServiceTrackersCreated)
                {
                    sendConfigFactoryObjCompleteEvent();
                }
            }
        };
        final Dictionary<String, Object> props = new Hashtable<String, Object>();
        props.put(EventConstants.EVENT_TOPIC, ConfigLoadingConstants.TOPIC_CONFIG_FACTORY_OBJ_LOADED_EVENT);
        m_EventHandlerReg = m_BundleContext.registerService(EventHandler.class, eventHandler, props);
    }
@ Activate public void activate ( final BundleContext context ) { m_BundleContext = context ; m_ServiceTrackerList = new ArrayList < ServiceTracker < FactoryDescriptor , FactoryDescriptor > > ( ) ; final EventHandler eventHandler = new EventHandler ( ) { private int m_FactoryObjCount ; @ Override public void handleEvent ( final Event event ) { m_FactoryObjCount ++ ; if ( m_FactoryObjCount == m_NumServiceTrackersCreated ) { sendConfigFactoryObjCompleteEvent ( ) ; } } } ; final Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; props . put ( EventConstants . EVENT_TOPIC , ConfigLoadingConstants . TOPIC_CONFIG_FACTORY_OBJ_LOADED_EVENT ) ; m_EventHandlerReg = m_BundleContext . registerService ( EventHandler . class , eventHandler , props ) ; }
The service component activation method.
The service component activation method .
// Create an event handler to wait for all factory objects to be loaded