protected Future < ? > dispatch ( final int eventType , final String factoryPid , final String pid ) { final ConfigurationEvent event = createConfigurationEvent ( eventType , factoryPid , pid ) ; if ( event == null ) return null ; final ServiceReference < ConfigurationListener > [ ] refs = st . getServiceReferences ( ) ; if ( refs == null ) return null ; final String qPid = ( factoryPid != null ) ? factoryPid : pid ; return caFactory . updateQueue . add ( qPid , new Runnable ( ) { @ Override @ FFDCIgnore ( Exception . class ) public void run ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "dispatch: sending configuration listener event for " + qPid ) ; } for ( ServiceReference < ConfigurationListener > sr : refs ) { if ( sr != null ) { ConfigurationListener cl = st . getService ( sr ) ; if ( cl != null && FrameworkState . isValid ( ) ) { try { cl . configurationEvent ( event ) ; } catch ( Exception e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "dispatch(): Exception thrown while trying to dispatch ConfigurationEvent." , e ) ; } FFDCFilter . processException ( e , ME , "dispatch(): Exception thrown while trying to dispatch ConfigurationEvent." , new Object [ ] { pid , factoryPid , eventType , cl } ) ; } } } } } } ) ; }
Dispatch ConfigurationEvent to the ConfigurationListeners .