public boolean isReadyForNext ( ) { if ( objectMapper == null ) objectMapper = new ObjectMapper ( ) ; try { int masterStream = Integer . parseInt ( ndarraySendUrl . split ( ":" ) [ 2 ] ) ; SubscriberState subscriberState = objectMapper . readValue ( Unirest . get ( String . format ( "http://%s:%d/state/%d" , masterStatusHost , masterStatusPort , masterStream ) ) . asJson ( ) . getBody ( ) . toString ( ) , SubscriberState . class ) ; return subscriberState . isReady ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return false ; }
Returns true if the client is ready for a next array or not