protected void notifyRequestListeners ( RequestNotifierAction action , HttpServletRequest req , HttpServletResponse resp ) throws IOException { // notify any listeners that the config has been updated IServiceReference [ ] refs = null ; try { refs = getPlatformServices ( ) . getServiceReferences ( IRequestListener . class . getName ( ) , "(name=" + getName ( ) + ")" ) ; //$NON-NLS-1$ //$NON-NLS-2$ } catch ( PlatformServicesException e ) { if ( log . isLoggable ( Level . SEVERE ) ) { log . log ( Level . SEVERE , e . getMessage ( ) , e ) ; } } if ( refs != null ) { for ( IServiceReference ref : refs ) { IRequestListener listener = ( IRequestListener ) getPlatformServices ( ) . getService ( ref ) ; try { if ( action == RequestNotifierAction . start ) { listener . startRequest ( req , resp ) ; } else { listener . endRequest ( req , resp ) ; } } finally { getPlatformServices ( ) . ungetService ( ref ) ; } } } }
Calls the registered request notifier listeners .