public boolean isSendRemoteMessage ( BaseMessage message ) { Iterator < BaseMessageFilter > iterator = this . getMessageFilterList ( ) . getFilterList ( null ) ; // ALL The filters (not just matches). while ( iterator . hasNext ( ) ) { BaseMessageFilter filter = iterator . next ( ) ; if ( ! filter . isRemoteFilter ( ) ) // Always send down when filter is a remote copy if ( filter . isSendRemoteMessage ( message ) == false ) return false ; // Don't send this message down } return true ; }
Do I send this message to the remote server? Remember to check for the filter match .