private boolean notifyListenerRequestSend ( HttpMessage httpMessage ) { ProxyListener listener = null ; List < ProxyListener > listenerList = parentServer . getListenerList ( ) ; for ( int i = 0 ; i < listenerList . size ( ) ; i ++ ) { listener = listenerList . get ( i ) ; try { if ( ! listener . onHttpRequestSend ( httpMessage ) ) { return false ; } } catch ( Exception e ) { log . error ( "An error occurred while notifying listener:" , e ) ; } } return true ; }
Go through each observers to process a request in each observers . The method can be modified in each observers .