Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ping Server Status & Action

 
Tarun Trehan
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a blog site for which i need to check the status and send an alert if the blog is not up and running.
I need to repeat this task every 30 minutes(configurable in code). Though i have couple of other questions which i can come to later; my initial one is that:
"If the server has not been started/not responding , there is problem and i should get a notification/alert for it.
I wrote the java code for this. However, whenever the server is not started, i do not get a proper response code; instead i get a "Connect Exception".
Hence, i have to call the alert/notification code from an exception."
Is that correct (to initiate a business scenario from a catch block) or am i missing something here ??

Following are some code snippets.
 
Tarun Trehan
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

Appreciate a response and inputs on this query.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic