code: 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.");
      }
docs: Starts a loop to send createChannel requests to a bounce proxy with a
  maximum number of retries.
  
  @param bpInfo
  information about the bounce proxy to create the channel at
  @param ccid
  the channel ID for the channel to create
  @param trackingId
  a tracking ID necessary for long polling
  @param retries
  the maximum number of retries
  @return the url of the channel at the bounce proxy as it was returned by
  the bounce proxy itself
  @throws JoynrProtocolException
  if the bounce proxy rejects channel creation