|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| 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.hyperic.hq.ui.servlet.ParameterizedServlet
org.hyperic.hq.ui.servlet.ImageServlet
org.hyperic.hq.ui.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 |
|---|---|
| unitUnits | <integer UNIT_NONE> |
| unitScale | <integer SCALE_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
The unitUnits and unitScale parameters
must be valid integers from .UnitsConstants
UnitsConstants,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
BASELINE_PARAM
Request parameter for baseline. |
static java.lang.String |
HIGHRANGE_PARAM
Request parameter for baseline. |
static int |
IMAGE_HEIGHT_DEFAULT
Default image height. |
static int |
IMAGE_WIDTH_DEFAULT
Default image width. |
static java.lang.String |
LOWRANGE_PARAM
Request parameter for baseline. |
static java.lang.String |
SHOW_AVERAGE_PARAM
Request parameter for whether or not to show average. |
static java.lang.String |
SHOW_BASELINE_PARAM
Request parameter for whether or not to show baseline. |
static java.lang.String |
SHOW_HIGHRANGE_PARAM
Request parameter for whether or not to show high range. |
static java.lang.String |
SHOW_LOW_PARAM
Request parameter for whether or not to show the low. |
static java.lang.String |
SHOW_LOWRANGE_PARAM
Request parameter for whether or not to show low range. |
static java.lang.String |
SHOW_PEAK_PARAM
Request parameter for whether or not to show the peak. |
static java.lang.String |
SHOW_VALUES_PARAM
Request parameter for whether or not to show the actual values. |
static java.lang.String |
UNIT_SCALE_PARAM
Request parameter for unit scale. |
static java.lang.String |
UNIT_UNITS_PARAM
Request parameter for unit scale. |
| Fields inherited from class org.hyperic.hq.ui.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(javax.servlet.http.HttpServletRequest request,
ChartDataBean dataBean)
Create and return the chart. |
protected java.lang.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. |
protected int |
getDefaultUnitScale()
Return the default unitScale. |
protected int |
getDefaultUnitUnits()
Return the default unitUnits. |
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,
javax.servlet.http.HttpServletRequest request)
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,
ChartDataBean dataBean)
This method will be called automatically by the ChartServlet. |
protected void |
renderJpegImage(javax.servlet.ServletOutputStream out,
java.lang.Object imgObj)
Render a JPEG version of the image into the output stream. |
protected void |
renderPngImage(javax.servlet.ServletOutputStream out,
java.lang.Object imgObj)
Render a PNG version of the image into the output stream. |
| Methods inherited from class org.hyperic.hq.ui.servlet.ImageServlet |
|---|
doGet, getDefaultImageFormat, 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 java.lang.String UNIT_UNITS_PARAM
public static final java.lang.String UNIT_SCALE_PARAM
public static final int IMAGE_WIDTH_DEFAULT
public static final int IMAGE_HEIGHT_DEFAULT
public static final java.lang.String SHOW_PEAK_PARAM
public static final java.lang.String SHOW_HIGHRANGE_PARAM
public static final java.lang.String SHOW_VALUES_PARAM
public static final java.lang.String SHOW_AVERAGE_PARAM
public static final java.lang.String SHOW_LOWRANGE_PARAM
public static final java.lang.String SHOW_LOW_PARAM
public static final java.lang.String SHOW_BASELINE_PARAM
public static final java.lang.String BASELINE_PARAM
public static final java.lang.String HIGHRANGE_PARAM
public static final java.lang.String LOWRANGE_PARAM
| Constructor Detail |
|---|
public ChartServlet()
| Method Detail |
|---|
protected java.lang.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,
java.lang.Object imgObj)
throws java.io.IOException
renderPngImage in class ImageServletout - the output stream
java.io.IOException
protected void renderJpegImage(javax.servlet.ServletOutputStream out,
java.lang.Object imgObj)
throws java.io.IOException
renderJpegImage in class ImageServletout - the output stream
java.io.IOExceptionprotected void parseParameters(javax.servlet.http.HttpServletRequest request)
parseParameters in class ImageServletrequest - the HTTP request object
protected abstract Chart createChart(javax.servlet.http.HttpServletRequest request,
ChartDataBean dataBean)
request - TODOdataBean - TODO
protected void initializeChart(Chart chart,
javax.servlet.http.HttpServletRequest request)
chart - the chartrequest - TODO
protected abstract void plotData(javax.servlet.http.HttpServletRequest request,
Chart chart,
ChartDataBean dataBean)
throws javax.servlet.ServletException
request - the HTTP requestdataBean - TODO
javax.servlet.ServletExceptionpublic boolean getShowLow()
showLow.
public boolean getShowPeak()
showPeak.
public boolean getShowAvg()
showAverage.
protected int getDefaultUnitUnits()
unitUnits.
protected int getDefaultUnitScale()
unitScale.
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.
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||