|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.rhq.enterprise.gui.common.servlet.ParameterizedServlet
org.rhq.enterprise.gui.common.servlet.ImageServlet
org.rhq.enterprise.gui.common.servlet.ChartServlet
public abstract class ChartServlet
This servlet returns a response that contains the binary data of an image (JPEG or PNG) that can be viewed in a web browser.
The chart servlet takes the following parameters (any applicable defaults are in bold and required parameters are in italics):
| key | value |
|---|---|
| measurementUnits | <MeasurementUnits.NONE> |
| showPeak | (false | true) |
| showHighRange | (false | true) |
| showValues | (false | true) |
| showAverage | (false | true) |
| showLowRange | (false | true) |
| showLow | (false | true) |
| showBaseline | (false | true) |
| baseline* | <double> |
| highRange* | <double> |
| lowRange* | <double> |
* only used and required if corresponding showXXX parameter is true
| Field Summary | |
|---|---|
static String |
BASELINE_PARAM
Request parameter for baseline. |
static String |
HIGHRANGE_PARAM
Request parameter for baseline. |
static int |
IMAGE_HEIGHT_DEFAULT
Default image height. |
static int |
IMAGE_WIDTH_DEFAULT
Default image width. |
static String |
LOWRANGE_PARAM
Request parameter for baseline. |
static String |
MEASUREMENT_UNITS_PARAM
|
static String |
SHOW_AVERAGE_PARAM
Request parameter for whether or not to show average. |
static String |
SHOW_BASELINE_PARAM
Request parameter for whether or not to show baseline. |
static String |
SHOW_HIGHRANGE_PARAM
Request parameter for whether or not to show high range. |
static String |
SHOW_LOW_PARAM
Request parameter for whether or not to show the low. |
static String |
SHOW_LOWRANGE_PARAM
Request parameter for whether or not to show low range. |
static String |
SHOW_PEAK_PARAM
Request parameter for whether or not to show the peak. |
static String |
SHOW_VALUES_PARAM
Request parameter for whether or not to show the actual values. |
protected org.rhq.core.domain.measurement.MeasurementUnits |
units
|
| Fields inherited from class org.rhq.enterprise.gui.common.servlet.ImageServlet |
|---|
IMAGE_FORMAT_JPEG, IMAGE_FORMAT_PARAM, IMAGE_FORMAT_PNG, IMAGE_HEIGHT_PARAM, IMAGE_WIDTH_PARAM |
| Constructor Summary | |
|---|---|
ChartServlet()
|
|
| Method Summary | |
|---|---|
protected abstract Chart |
createChart()
Create and return the chart. |
protected Object |
createImage(javax.servlet.http.HttpServletRequest request)
Create the image being rendered. |
protected int |
getDefaultImageHeight()
Return the default imageHeight. |
protected int |
getDefaultImageWidth()
Return the default imageWidth. |
protected boolean |
getDefaultShowAverage()
Return the default showAverage. |
protected boolean |
getDefaultShowBaseline()
Return the default showBaseline. |
protected boolean |
getDefaultShowHighRange()
Return the default showHighRange. |
protected boolean |
getDefaultShowLow()
Return the default showLow. |
protected boolean |
getDefaultShowLowRange()
Return the default Range. |
protected boolean |
getDefaultShowPeak()
Return the default showPeak. |
protected boolean |
getDefaultShowValues()
Return the default showValues. |
boolean |
getShowAvg()
Return the value of property showAverage. |
boolean |
getShowLow()
Return the value of property showLow. |
boolean |
getShowPeak()
Return the value of property showPeak. |
protected void |
initializeChart(Chart chart)
Initialize the chart. |
protected void |
parseParameters(javax.servlet.http.HttpServletRequest request)
This method will be called automatically by the ChartServlet. |
protected abstract void |
plotData(javax.servlet.http.HttpServletRequest request,
Chart chart)
This method will be called automatically by the ChartServlet. |
protected void |
renderJpegImage(javax.servlet.ServletOutputStream out,
Object imgObj)
Render a JPEG version of the image into the output stream. |
protected void |
renderPngImage(javax.servlet.ServletOutputStream out,
Object imgObj)
Render a PNG version of the image into the output stream. |
| Methods inherited from class org.rhq.enterprise.gui.common.servlet.ImageServlet |
|---|
doGet, getDefaultImageFormat, getImageFormat, getImageHeight, getImageWidth, init |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MEASUREMENT_UNITS_PARAM
public static final int IMAGE_WIDTH_DEFAULT
public static final int IMAGE_HEIGHT_DEFAULT
public static final String SHOW_PEAK_PARAM
public static final String SHOW_HIGHRANGE_PARAM
public static final String SHOW_VALUES_PARAM
public static final String SHOW_AVERAGE_PARAM
public static final String SHOW_LOWRANGE_PARAM
public static final String SHOW_LOW_PARAM
public static final String SHOW_BASELINE_PARAM
public static final String BASELINE_PARAM
public static final String HIGHRANGE_PARAM
public static final String LOWRANGE_PARAM
protected org.rhq.core.domain.measurement.MeasurementUnits units
| Constructor Detail |
|---|
public ChartServlet()
| Method Detail |
|---|
protected Object createImage(javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
createImage in class ImageServletrequest - the servlet request
javax.servlet.ServletException
protected void renderPngImage(javax.servlet.ServletOutputStream out,
Object imgObj)
throws IOException
renderPngImage in class ImageServletout - the output stream
IOException
protected void renderJpegImage(javax.servlet.ServletOutputStream out,
Object imgObj)
throws IOException
renderJpegImage in class ImageServletout - the output stream
IOExceptionprotected void parseParameters(javax.servlet.http.HttpServletRequest request)
parseParameters in class ImageServletrequest - the HTTP request objectprotected abstract Chart createChart()
protected void initializeChart(Chart chart)
chart - the chart
protected abstract void plotData(javax.servlet.http.HttpServletRequest request,
Chart chart)
throws javax.servlet.ServletException
request - the HTTP request
javax.servlet.ServletExceptionpublic boolean getShowLow()
showLow.
public boolean getShowPeak()
showPeak.
public boolean getShowAvg()
showAverage.
protected int getDefaultImageWidth()
imageWidth.
getDefaultImageWidth in class ImageServletprotected int getDefaultImageHeight()
imageHeight.
getDefaultImageHeight in class ImageServletprotected boolean getDefaultShowPeak()
showPeak.
protected boolean getDefaultShowHighRange()
showHighRange.
protected boolean getDefaultShowValues()
showValues.
protected boolean getDefaultShowAverage()
showAverage.
protected boolean getDefaultShowLowRange()
Range.
protected boolean getDefaultShowLow()
showLow.
protected boolean getDefaultShowBaseline()
showBaseline.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||