com.caucho.servlets
Class ResinStatusServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by com.caucho.servlets.ResinStatusServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig

public class ResinStatusServlet
extends GenericServlet

Displays some status information about the Resin server. The servlet must be explicitly enabled (using /servlet is forbidden), and it must have the init-param enable set to "read" or "write". (There will likely be a future additional requirement of satisfying a role.)

See Also:
Serialized Form

Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
ResinStatusServlet()
           
 
Method Summary
 void init()
          Initialize the servlet with the server's sruns.
 void printApplicationSummary(java.io.PrintWriter out, java.lang.String pwd)
           
 void printConnectionPools(java.io.PrintWriter out, java.lang.String context)
           
 void printFooter(java.io.PrintWriter out)
          Prints footer information.
 void printHeader(java.io.PrintWriter out)
          Prints generic server information.
 void printPorts(java.io.PrintWriter out)
          Prints application information.
 void printServerHeader(java.io.PrintWriter out)
          Prints server information.
 void printSrun(java.io.PrintWriter out)
           
 void printThreadHeader(java.io.PrintWriter out)
          Prints thread information.
 void printVirtualHosts(java.io.PrintWriter out)
           
 void service(ServletRequest request, ServletResponse response)
          Handle the request.
 void setEnable(java.lang.String enable)
          Set to read or write.
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

ResinStatusServlet

public ResinStatusServlet()
Method Detail

setEnable

public void setEnable(java.lang.String enable)
               throws ConfigException
Set to read or write.

Throws:
ConfigException

init

public void init()
          throws ServletException
Initialize the servlet with the server's sruns.

Overrides:
init in class GenericServlet
Throws:
ServletException

service

public void service(ServletRequest request,
                    ServletResponse response)
             throws java.io.IOException,
                    ServletException
Handle the request.

Parameters:
request - request information. Normally servlets will cast this to HttpServletRequest
response - response information. Normally servlets will cast this to HttpServletRequest
Throws:
java.io.IOException
ServletException

printHeader

public void printHeader(java.io.PrintWriter out)
                 throws java.io.IOException,
                        ServletException
Prints generic server information.

Throws:
java.io.IOException
ServletException

printServerHeader

public void printServerHeader(java.io.PrintWriter out)
                       throws java.lang.Exception
Prints server information.

Throws:
java.lang.Exception

printThreadHeader

public void printThreadHeader(java.io.PrintWriter out)
                       throws java.lang.Exception
Prints thread information.

Throws:
java.lang.Exception

printPorts

public void printPorts(java.io.PrintWriter out)
                throws java.io.IOException,
                       ServletException
Prints application information.

Throws:
java.io.IOException
ServletException

printSrun

public void printSrun(java.io.PrintWriter out)
               throws java.io.IOException,
                      ServletException
Throws:
java.io.IOException
ServletException

printConnectionPools

public void printConnectionPools(java.io.PrintWriter out,
                                 java.lang.String context)
                          throws java.lang.Exception
Throws:
java.lang.Exception

printApplicationSummary

public void printApplicationSummary(java.io.PrintWriter out,
                                    java.lang.String pwd)
                             throws java.lang.Exception
Throws:
java.lang.Exception

printVirtualHosts

public void printVirtualHosts(java.io.PrintWriter out)
                       throws java.io.IOException,
                              ServletException
Throws:
java.io.IOException
ServletException

printFooter

public void printFooter(java.io.PrintWriter out)
                 throws java.io.IOException,
                        ServletException
Prints footer information.

Throws:
java.io.IOException
ServletException