org.jcoderz.phoenix.servlet
Class PingServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.jcoderz.phoenix.servlet.PingServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public final class PingServlet
extends HttpServlet

This servlet sends a simple ping to the given host and returns a 1 pixel image with a color representing the host status.

Author:
Andreas Mandel
See Also:
Serialized Form
web.servlet
name="ping"
web.servlet-mapping
url-pattern="/ping/*"

Field Summary
static String DATE_TIME_FORMAT
          The format used to write date values.
static TimeZone TIME_ZONE
          Timezone used by the protocol.
 
Constructor Summary
PingServlet()
           
 
Method Summary
protected  org.jcoderz.phoenix.servlet.PingServlet.PingResult check(String host)
           
protected  void doGet(HttpServletRequest req, HttpServletResponse rsp)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse rsp)
           
protected static long ping(InetAddress host)
           
protected static long ping(String hostname)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_ZONE

public static final TimeZone TIME_ZONE
Timezone used by the protocol.


DATE_TIME_FORMAT

public static final String DATE_TIME_FORMAT
The format used to write date values.

See Also:
Constant Field Values
Constructor Detail

PingServlet

public PingServlet()
Method Detail

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse rsp)
               throws IOException
Overrides:
doPost in class HttpServlet
Throws:
IOException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse rsp)
              throws IOException
Overrides:
doGet in class HttpServlet
Throws:
IOException

check

protected org.jcoderz.phoenix.servlet.PingServlet.PingResult check(String host)

ping

protected static long ping(String hostname)

ping

protected static long ping(InetAddress host)


Copyright 2007 The jCoderZ Project.