public WaiterState accepts ( Output response ) { for ( WaiterAcceptor < Output > acceptor : acceptors ) { if ( acceptor . matches ( response ) ) { return acceptor . getState ( ) ; } } return WaiterState . RETRY ; }
Compares the response against each response acceptor and returns the state of the acceptor it matches on . If none is matched returns retry state by default