Hi,
I am calling a Webservice to check whether a particular service is down or up , if it is down, then I need to set the sleep interval for 5 minutes and then retry connecting the webservice for 5 attempts and see whether the response is positive – if all the 5 attempts failed then send an email.
If (service.getHealth()=null){
// set the sleep interval for 5 mintues
// set the retry mechnaoism for 5 attempts
If(all the 5 attempts = failed){
//sendEmail
}
}
Please let me know how we can do it ? which is the best way in handling the sleep and retry mechanism in java? Please provide your input.
Thanks