mil.dod.th.ose.core/src/mil/dod/th/ose/core/factory/api/FactoryRegistry.java
@Override
        public void handleEvent(final Event event)
        {
            synchronized (m_PendingObjects)
            {
                final Iterator<PendingFactoryObject> pendingIterator = m_PendingObjects.iterator();
                while (pendingIterator.hasNext())
                {
                    final PendingFactoryObject pendingObject = pendingIterator.next();
                    m_Logging.debug("checking pending %s with UUID=%s", m_BaseType,
                            pendingObject.getUuid());
                    
                    final Dictionary<String, Object> properties = pendingObject.getProperties();
                    final DependencyState state = isSatisfied(pendingObject.getUuid(), properties);
                    
                    if (state == DependencyState.SATISFIED)
                    {
                        pendingIterator.remove();  // remove iterator first so not checked again, 
                                                   // creation below will cause another check of 
                                                   // remaining pending objects
                        final FactoryInternal factory = pendingObject.getFactory();
                        try
                        {
                            createOrRestoreObject(factory, pendingObject.getUuid());
                        }
                        catch (final FactoryException e)
                        {
                            m_Logging.error(e, "Unable to create a pending %s [%s]", 
                                    m_BaseType, pendingObject);
                        }
                        catch (final FactoryObjectInformationException e)
                        {
                            m_Logging.error(e, "Persisted data for pending %s [%s] is unreadable.", 
                                m_BaseType, pendingObject);
                        }
                    }
                }
            }
        }
/**
         * Handle event when an object is created that may satisfy a dependency for another object.
         * 
         * @param event
         *      the event that contains the information about a created object
         */
Handle event when an object is created that may satisfy a dependency for another object.

@param event
the event that contains the information about a created object
Handle event when an object is created that may satisfy a dependency for another object . @param event the event that contains the information about a created object
@Override
        public void handleEvent(final Event event)
        {
            synchronized (m_PendingObjects)
            {
                final Iterator<PendingFactoryObject> pendingIterator = m_PendingObjects.iterator();
                while (pendingIterator.hasNext())
                {
                    final PendingFactoryObject pendingObject = pendingIterator.next();
                    m_Logging.debug("checking pending %s with UUID=%s", m_BaseType,
                            pendingObject.getUuid());
                    final Dictionary<String, Object> properties = pendingObject.getProperties();
                    final DependencyState state = isSatisfied(pendingObject.getUuid(), properties);
                    if (state == DependencyState.SATISFIED)
                    {
                        pendingIterator.remove();  
                        final FactoryInternal factory = pendingObject.getFactory();
                        try
                        {
                            createOrRestoreObject(factory, pendingObject.getUuid());
                        }
                        catch (final FactoryException e)
                        {
                            m_Logging.error(e, "Unable to create a pending %s [%s]", 
                                    m_BaseType, pendingObject);
                        }
                        catch (final FactoryObjectInformationException e)
                        {
                            m_Logging.error(e, "Persisted data for pending %s [%s] is unreadable.", 
                                m_BaseType, pendingObject);
                        }
                    }
                }
            }
        }
@ Override public void handleEvent ( final Event event ) { synchronized ( m_PendingObjects ) { final Iterator < PendingFactoryObject > pendingIterator = m_PendingObjects . iterator ( ) ; while ( pendingIterator . hasNext ( ) ) { final PendingFactoryObject pendingObject = pendingIterator . next ( ) ; m_Logging . debug ( "checking pending %s with UUID=%s" , m_BaseType , pendingObject . getUuid ( ) ) ; final Dictionary < String , Object > properties = pendingObject . getProperties ( ) ; final DependencyState state = isSatisfied ( pendingObject . getUuid ( ) , properties ) ; if ( state == DependencyState . SATISFIED ) { pendingIterator . remove ( ) ; final FactoryInternal factory = pendingObject . getFactory ( ) ; try { createOrRestoreObject ( factory , pendingObject . getUuid ( ) ) ; } catch ( final FactoryException e ) { m_Logging . error ( e , "Unable to create a pending %s [%s]" , m_BaseType , pendingObject ) ; } catch ( final FactoryObjectInformationException e ) { m_Logging . error ( e , "Persisted data for pending %s [%s] is unreadable." , m_BaseType , pendingObject ) ; } } } } }
Handle event when an object is created that may satisfy a dependency for another object.
Handle event when an object is created that may satisfy a dependency for another object .
// remove iterator first so not checked again,  // creation below will cause another check of  // remaining pending objects