public class XHTMLRenderer extends Object implements IRenderer
CounterSet
.Modifier and Type | Class and Description |
---|---|
static class |
XHTMLRenderer.HTMLPivotTableRenderer |
class |
XHTMLRenderer.HTMLValueFormatter |
Constructor and Description |
---|
XHTMLRenderer(URLQueryModel model,
ICounterSelector counterSelector) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptEvent(Event e)
Applies the
URLQueryModel.eventFilters to the event. |
static String |
attrib(String s)
Encoding a string for including in an (X)HTML attribute value.
|
static String |
cdata(String s)
Encode a string for including in a CDATA section.
|
protected String |
getEventKey(Event e)
The key for an event group is formed by combining the String value of the
fields of the event identified by the orderEventBy[] in order and using a
":" when combining two or more event fields together.
|
protected String |
getEventTable(Event e) |
void |
render(Writer w)
Render the data.
|
protected String |
value(ICounter<?> counter,
Object val)
Deprecated.
Move into formatter objects.
|
protected void |
writeBody(Writer w) |
protected void |
writeCounter(Writer w,
ICounter counter)
Writes details on a single counter using a
HistoryTable view. |
protected void |
writeCounterSet(Writer w,
CounterSet counterSet,
int depth)
Writes all counters in the hierarchy starting with the specified
CounterSet in a single table (this is the navigational view of
the counter set hierarchy). |
protected void |
writeDocType(Writer w) |
protected void |
writeEventFlyover(Writer w,
Event e)
Pretty up an event by rendering onto the
Writer as an (X)HTML
table. |
protected void |
writeEvents(Writer w,
IEventReportingService eventReportingService)
Plots events using
flot . |
protected void |
writeFlot(Writer w,
IEventReportingService eventReportingService)
Write the html to render the Flot-based time-series chart, plotting the
supplied events.
|
protected void |
writeFullPath(Writer w,
String path)
Deprecated.
by refactor inside of a rendering object.
|
protected void |
writeHead(Writer w) |
protected void |
writeHistoryTable(Writer w,
ICounter[] a,
PeriodEnum basePeriod,
TimestampFormatEnum timestampFormat)
Writes out a table containing the histories for the selected counters.
|
protected void |
writeHtml(Writer w)
The start
html tag. |
protected void |
writePath(Writer w,
String path,
int rootDepth)
Deprecated.
by refactor inside of a rendering object.
|
protected void |
writePivotTable(Writer w,
ICounter[] a)
Writes data in a format suitable for use in a pivot table.
|
protected void |
writePivotTable(Writer w,
ICounter[] a,
PeriodEnum basePeriod,
TimestampFormatEnum timestampFormat)
Writes out a pivot table view.
|
protected void |
writeResource(Writer w,
String resource)
Write a text file into the html.
|
protected void |
writeScripts(Writer w) |
protected void |
writeTitle(Writer w) |
protected void |
writeXmlDecl(Writer w) |
public static final String ps
public XHTMLRenderer(URLQueryModel model, ICounterSelector counterSelector)
model
- Describes the state of the controller (e.g., as parsed from
the URL query parameters).counterSelector
- Selects the counters to be rendered.public void render(Writer w) throws IOException
IRenderer
render
in interface IRenderer
w
- IOException
protected void writeXmlDecl(Writer w) throws IOException
IOException
protected void writeDocType(Writer w) throws IOException
w
- IOException
protected void writeHtml(Writer w) throws IOException
html
tag.IOException
protected void writeHead(Writer w) throws IOException
IOException
protected void writeTitle(Writer w) throws IOException
IOException
protected void writeScripts(Writer w) throws IOException
IOException
protected void writeBody(Writer w) throws IOException
IOException
protected void writeFullPath(Writer w, String path) throws IOException
IOException
protected void writePath(Writer w, String path, int rootDepth) throws IOException
rootDepth
- The path components will be shown beginning at this depth -
ZERO (0) is the root.IOException
protected void writeCounterSet(Writer w, CounterSet counterSet, int depth) throws IOException
CounterSet
in a single table (this is the navigational view of
the counter set hierarchy).IOException
protected void writeCounter(Writer w, ICounter counter) throws IOException
HistoryTable
view.counter
- The counter.IOException
protected void writeHistoryTable(Writer w, ICounter[] a, PeriodEnum basePeriod, TimestampFormatEnum timestampFormat) throws IOException
a
- The selected counters.basePeriod
- Identifies the history to be written for each of the selected
counters by its based reporting period.timestampFormat
- The format in which to report the timestamp associated with
the row.IllegalArgumentException
- if w is null
.IllegalArgumentException
- if a is null
.IllegalArgumentException
- if any element of a null
.IllegalArgumentException
- if any element of a does not use a
HistoryInstrument
.IOException
protected void writePivotTable(Writer w, ICounter[] a, PeriodEnum basePeriod, TimestampFormatEnum timestampFormat) throws IOException
w
- Where to write the data.a
- The selected counters.basePeriod
- timestampFormat
- IOException
protected void writePivotTable(Writer w, ICounter[] a) throws IOException
The pivot table data are selected in the same manner as the correlated
view and are used to generate a HistoryTable
. There will be one
data row per row in the history table. There will be one category column
for each capturing group in the URLQueryModel.pattern
, one column
for the timestamp associated with the row, and one for the value of each
performance counter selected by the URLQueryModel.pattern
.
Since the pivot table and the correlated view are both based on the
HistoryTable
you can switch between these views simply by
changing the URLQueryModel.reportType
using the
URL query parameter.
IOException
ReportEnum.pivot
protected void writeFlot(Writer w, IEventReportingService eventReportingService) throws IOException
IOException
protected boolean acceptEvent(Event e)
URLQueryModel.eventFilters
to the event.e
- The event.true
if the filters accept the event.protected String getEventKey(Event e)
protected void writeEvents(Writer w, IEventReportingService eventReportingService) throws IOException
flot
.protected void writeEventFlyover(Writer w, Event e) throws IOException
Writer
as an (X)HTML
table.w
- The writer.e
- The event.IOException
protected void writeResource(Writer w, String resource) throws IOException
IOException
public static String cdata(String s)
s
- The string.public static String attrib(String s)
s
- The string.protected String value(ICounter<?> counter, Object val)
IServiceCounters.LOCAL_HTTPD
as a link anchor.counter
- The counter.value
- The counter value (MAY be null
).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.