| java.lang.Object org.apache.catalina.manager.StatusTransformer
StatusTransformer | public class StatusTransformer (Code) | | This is a refactoring of the servlet to externalize
the output into a simple class. Although we could
use XSLT, that is unnecessarily complex.
author: Peter Lin version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Method Summary | |
public static String | filter(Object obj) Filter the specified message string for characters that are sensitive
in HTML. | public static String | formatSeconds(Object obj) Formats the given time (given in seconds) as a string. | public static String | formatSize(Object obj, boolean mb) Display the given size in bytes, either as KB or MB. | public static String | formatTime(Object obj, boolean seconds) Display the given time in ms, either as ms or s. | public static void | setContentType(HttpServletResponse response, int mode) | public static void | writeBody(PrintWriter writer, Object[] args, int mode) Write the header body. | public static void | writeConnectorState(PrintWriter writer, ObjectName tpName, String name, MBeanServer mBeanServer, Vector globalRequestProcessors, Vector requestProcessors, int mode) Write connector state. | protected static void | writeContext(PrintWriter writer, ObjectName objectName, MBeanServer mBeanServer, int mode) Write context state. | public static void | writeDetailedState(PrintWriter writer, MBeanServer mBeanServer, int mode) Write applications state. | public static void | writeFooter(PrintWriter writer, int mode) | public static void | writeHeader(PrintWriter writer, int mode) Process a GET request for the specified resource. | public static void | writeJspMonitor(PrintWriter writer, Set jspMonitorONs, MBeanServer mBeanServer, int mode) Write JSP monitoring information. | public static void | writeManager(PrintWriter writer, Object[] args, int mode) Write the manager webapp information. | public static void | writeManager(PrintWriter writer, ObjectName objectName, MBeanServer mBeanServer, int mode) Write detailed information about a manager. | public static void | writeOSState(PrintWriter writer, int mode) Write the OS state. | public static void | writePageHeading(PrintWriter writer, Object[] args, int mode) | protected static void | writeProcessorState(PrintWriter writer, ObjectName pName, MBeanServer mBeanServer, int mode) Write processor state. | public static void | writeServerInfo(PrintWriter writer, Object[] args, int mode) | public static void | writeVMState(PrintWriter writer, int mode) Write the VM state. | public static void | writeWrapper(PrintWriter writer, ObjectName objectName, MBeanServer mBeanServer, int mode) Write detailed information about a wrapper. |
filter | public static String filter(Object obj)(Code) | | Filter the specified message string for characters that are sensitive
in HTML. This avoids potential attacks caused by including JavaScript
codes in the request URL that is often reported in error messages.
Parameters: obj - The message string to be filtered |
formatSeconds | public static String formatSeconds(Object obj)(Code) | | Formats the given time (given in seconds) as a string.
Parameters: obj - Time object to be formatted as string String formatted time |
formatSize | public static String formatSize(Object obj, boolean mb)(Code) | | Display the given size in bytes, either as KB or MB.
Parameters: mb - true to display megabytes, false for kilobytes |
formatTime | public static String formatTime(Object obj, boolean seconds)(Code) | | Display the given time in ms, either as ms or s.
Parameters: seconds - true to display seconds, false for milliseconds |
writeBody | public static void writeBody(PrintWriter writer, Object[] args, int mode)(Code) | | Write the header body. XML output doesn't bother
to output this stuff, since it's just title.
Parameters: writer - The output writer Parameters: args - What to write Parameters: mode - 0 means write |
writeHeader | public static void writeHeader(PrintWriter writer, int mode)(Code) | | Process a GET request for the specified resource.
Parameters: request - The servlet request we are processing Parameters: response - The servlet response we are creating exception: IOException - if an input/output error occurs exception: ServletException - if a servlet-specified error occurs |
writeManager | public static void writeManager(PrintWriter writer, Object[] args, int mode)(Code) | | Write the manager webapp information.
Parameters: writer - The output writer Parameters: args - What to write Parameters: mode - 0 means write |
writeOSState | public static void writeOSState(PrintWriter writer, int mode)(Code) | | Write the OS state. Mode 0 will generate HTML.
Mode 1 will generate XML.
|
writeVMState | public static void writeVMState(PrintWriter writer, int mode) throws Exception(Code) | | Write the VM state. Mode 0 will generate HTML.
Mode 1 will generate XML.
|
|
|