public SipResponse findMostRecentResponse ( int statusCode ) { List < SipResponse > responses = getAllReceivedResponses ( ) ; ListIterator < SipResponse > i = responses . listIterator ( responses . size ( ) ) ; while ( i . hasPrevious ( ) ) { SipResponse resp = i . previous ( ) ; if ( resp . getStatusCode ( ) == statusCode ) { return resp ; } } return null ; }
Finds the last received response with status code matching the given parameter .