private void reportEventLoop() {

        long loopStartingTime = timestampProvider.getCurrentTime();
        boolean shutdownReportSuccessful = false;

        // try for at most maxSendShutdownTimeSecs secs to reach the bounce
        // proxy, otherwise just shutdown
        while (!shutdownReportSuccessful
                && (timestampProvider.getCurrentTime() - loopStartingTime) < maxSendShutdownTimeSecs * 1000) {
            try {
                reportEventAsHttpRequest();
                // if no exception is thrown, reporting was successful and we
                // can return here
                shutdownReportSuccessful = true;
            } catch (Exception e) {
                // TODO we might have to intercept the JoynrHttpMessage if the
                // bounce proxy responds that the client could not be
                // de-registered. Then we won't have to try to register forever.
                // Do a more detailed error handling here!
                logger.error("error notifying of Bounce Proxy shutdown: message: {}", e.getMessage());
            }
            try {
                Thread.sleep(sendReportRetryIntervalMs);
            } catch (InterruptedException e) {
                break;
            }
        }
    }
private void reportEventLoop ( ) { long loopStartingTime = timestampProvider . getCurrentTime ( ) ; boolean shutdownReportSuccessful = false ; while ( ! shutdownReportSuccessful && ( timestampProvider . getCurrentTime ( ) - loopStartingTime ) < maxSendShutdownTimeSecs * 1000 ) { try { reportEventAsHttpRequest ( ) ; shutdownReportSuccessful = true ; } catch ( Exception e ) { logger . error ( "error notifying of Bounce Proxy shutdown: message: {}" , e . getMessage ( ) ) ; } try { Thread . sleep ( sendReportRetryIntervalMs ) ; } catch ( InterruptedException e ) { break ; } } }
Starts a loop to send a shutdown report to the monitoring service.<br>
The loop is executed for a certain amount of time, if shutdown reporting
is not successful.