private URI createChannelLoop ( ControlledBounceProxyInformation bpInfo , String ccid , String trackingId , int retries ) throws JoynrProtocolException { while ( retries > 0 ) { retries -- ; try { return sendCreateChannelHttpRequest ( bpInfo , ccid , trackingId ) ; } catch ( IOException e ) { // failed to establish communication with the bounce proxy logger . error ( "creating a channel on bounce proxy {} failed due to communication errors: message: {}" , bpInfo . getId ( ) , e . getMessage ( ) ) ; } // try again if creating the channel failed try { Thread . sleep ( sendCreateChannelRetryIntervalMs ) ; } catch ( InterruptedException e ) { throw new JoynrRuntimeException ( "creating a channel on bounce proxy " + bpInfo . getId ( ) + " was interrupted." ) ; } } // the maximum number of retries passed, so channel creation failed throw new JoynrRuntimeException ( "creating a channel on bounce proxy " + bpInfo . getId ( ) + " failed." ) ; }
Starts a loop to send createChannel requests to a bounce proxy with a maximum number of retries .