public class StatusTransformer extends Object
Constructor and Description |
---|
StatusTransformer() |
Modifier and Type | Method and Description |
---|---|
static String |
filter(Object obj)
Filter the specified message string for characters that are sensitive
in HTML.
|
static String |
filterXml(String s)
Escape the 5 entities defined by XML.
|
static String |
formatSeconds(Object obj)
Formats the given time (given in seconds) as a string.
|
static String |
formatSize(Object obj,
boolean mb)
Display the given size in bytes, either as KB or MB.
|
static String |
formatTime(Object obj,
boolean seconds)
Display the given time in ms, either as ms or s.
|
static void |
setContentType(HttpServletResponse response,
int mode) |
static void |
writeBody(PrintWriter writer,
Object[] args,
int mode)
Write the header body.
|
static void |
writeConnectorState(PrintWriter writer,
ObjectName tpName,
String name,
MBeanServer mBeanServer,
Vector<ObjectName> globalRequestProcessors,
Vector<ObjectName> requestProcessors,
int mode,
Object[] args)
Write connector state.
|
protected static void |
writeContext(PrintWriter writer,
ObjectName objectName,
MBeanServer mBeanServer,
int mode)
Write context state.
|
static void |
writeDetailedState(PrintWriter writer,
MBeanServer mBeanServer,
int mode)
Write applications state.
|
static void |
writeFooter(PrintWriter writer,
int mode) |
static void |
writeHeader(PrintWriter writer,
Object[] args,
int mode)
Write an HTML or XML header.
|
static void |
writeJspMonitor(PrintWriter writer,
Set<ObjectName> jspMonitorONs,
MBeanServer mBeanServer,
int mode)
Write JSP monitoring information.
|
static void |
writeManager(PrintWriter writer,
Object[] args,
int mode)
Write the manager webapp information.
|
static void |
writeManager(PrintWriter writer,
ObjectName objectName,
MBeanServer mBeanServer,
int mode)
Write detailed information about a manager.
|
static void |
writeOSState(PrintWriter writer,
int mode,
Object[] args)
Write the OS state.
|
static void |
writePageHeading(PrintWriter writer,
Object[] args,
int mode) |
protected static void |
writeProcessorState(PrintWriter writer,
ObjectName pName,
MBeanServer mBeanServer,
int mode)
Write processor state.
|
static void |
writeServerInfo(PrintWriter writer,
Object[] args,
int mode) |
static void |
writeVMState(PrintWriter writer,
int mode,
Object[] args)
Write the VM state.
|
static void |
writeWrapper(PrintWriter writer,
ObjectName objectName,
MBeanServer mBeanServer,
int mode)
Write detailed information about a wrapper.
|
public static void setContentType(HttpServletResponse response, int mode)
public static void writeHeader(PrintWriter writer, Object[] args, int mode)
writer
- the PrintWriter to useargs
- Path prefix for URLsmode
- - 0 = HTML header, 1 = XML declarationpublic static void writeBody(PrintWriter writer, Object[] args, int mode)
writer
- The output writerargs
- What to writemode
- 0 means writepublic static void writeManager(PrintWriter writer, Object[] args, int mode)
writer
- The output writerargs
- What to writemode
- 0 means writepublic static void writePageHeading(PrintWriter writer, Object[] args, int mode)
public static void writeServerInfo(PrintWriter writer, Object[] args, int mode)
public static void writeFooter(PrintWriter writer, int mode)
public static void writeOSState(PrintWriter writer, int mode, Object[] args)
writer
- The output writermode
- Mode 0
will generate HTML.
Mode 1
will generate XML.args
- I18n labels for the OS state valuespublic static void writeVMState(PrintWriter writer, int mode, Object[] args) throws Exception
writer
- The output writermode
- Mode 0
will generate HTML.
Mode 1
will generate XML.args
- I18n labels for the VM state valuesException
- Propagated JMX errorpublic static void writeConnectorState(PrintWriter writer, ObjectName tpName, String name, MBeanServer mBeanServer, Vector<ObjectName> globalRequestProcessors, Vector<ObjectName> requestProcessors, int mode, Object[] args) throws Exception
writer
- The output writertpName
- MBean name of the thread poolname
- Connector namemBeanServer
- MBean serverglobalRequestProcessors
- MBean names for the global request processorsrequestProcessors
- MBean names for the request processorsmode
- Mode 0
will generate HTML.
Mode 1
will generate XML.args
- I18n labels for the Connector state valuesException
- Propagated JMX errorprotected static void writeProcessorState(PrintWriter writer, ObjectName pName, MBeanServer mBeanServer, int mode) throws Exception
Exception
public static void writeDetailedState(PrintWriter writer, MBeanServer mBeanServer, int mode) throws Exception
Exception
protected static void writeContext(PrintWriter writer, ObjectName objectName, MBeanServer mBeanServer, int mode) throws Exception
Exception
public static void writeManager(PrintWriter writer, ObjectName objectName, MBeanServer mBeanServer, int mode) throws Exception
Exception
public static void writeJspMonitor(PrintWriter writer, Set<ObjectName> jspMonitorONs, MBeanServer mBeanServer, int mode) throws Exception
Exception
public static void writeWrapper(PrintWriter writer, ObjectName objectName, MBeanServer mBeanServer, int mode) throws Exception
Exception
public static String filter(Object obj)
obj
- The message string to be filteredpublic static String filterXml(String s)
s
- The message string to be filteredpublic static String formatSize(Object obj, boolean mb)
mb
- true to display megabytes, false for kilobytespublic static String formatTime(Object obj, boolean seconds)
seconds
- true to display seconds, false for millisecondsCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.