|
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
public abstract class ImageServlet
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 navigation map servlet takes the following parameters (any applicable defaults are in bold and required parameters are in italics):
key | value |
---|---|
imageFormat | (png | jpeg) |
imageWidth | <integer (700)> |
imageHeight | <integer (350)> |
Field Summary | |
---|---|
static java.lang.String |
IMAGE_FORMAT_JPEG
Request parameter value representing a JPEG image. |
static java.lang.String |
IMAGE_FORMAT_PARAM
Request parameter for image format. |
static java.lang.String |
IMAGE_FORMAT_PNG
Request parameter value representing a PNG image. |
static int |
IMAGE_HEIGHT_DEFAULT
Default image height. |
static java.lang.String |
IMAGE_HEIGHT_PARAM
Request parameter for image height. |
static int |
IMAGE_WIDTH_DEFAULT
Default image width. |
static java.lang.String |
IMAGE_WIDTH_PARAM
Request parameter for image width. |
Constructor Summary | |
---|---|
ImageServlet()
|
Method Summary | |
---|---|
protected abstract java.lang.Object |
createImage(javax.servlet.http.HttpServletRequest request)
Create the image being rendered. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected java.lang.String |
getDefaultImageFormat()
Return the default imageFormat . |
protected int |
getDefaultImageHeight()
Return the default imageHeight . |
protected int |
getDefaultImageWidth()
Return the default imageWidth . |
protected int |
getImageHeight(javax.servlet.http.HttpServletRequest request)
Return the image height. |
protected int |
getImageWidth(javax.servlet.http.HttpServletRequest request)
Return the image width. |
void |
init()
|
protected abstract void |
parseParameters(javax.servlet.http.HttpServletRequest request)
This method will be called automatically by the ImageServlet. |
protected abstract void |
renderJpegImage(javax.servlet.ServletOutputStream out,
java.lang.Object imgObj)
Render a JPEG version of the image into the output stream. |
protected abstract 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 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 IMAGE_FORMAT_PARAM
public static final java.lang.String IMAGE_FORMAT_PNG
public static final java.lang.String IMAGE_FORMAT_JPEG
public static final java.lang.String IMAGE_WIDTH_PARAM
public static final int IMAGE_WIDTH_DEFAULT
public static final java.lang.String IMAGE_HEIGHT_PARAM
public static final int IMAGE_HEIGHT_DEFAULT
Constructor Detail |
---|
public ImageServlet()
Method Detail |
---|
public void init()
init
in class javax.servlet.GenericServlet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
protected abstract java.lang.Object createImage(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
request
- the servlet request
javax.servlet.ServletException
protected abstract void renderPngImage(javax.servlet.ServletOutputStream out, java.lang.Object imgObj) throws java.io.IOException
out
- the output stream
java.io.IOException
protected abstract void renderJpegImage(javax.servlet.ServletOutputStream out, java.lang.Object imgObj) throws java.io.IOException
out
- the output stream
java.io.IOException
protected abstract void parseParameters(javax.servlet.http.HttpServletRequest request)
request
- the HTTP request objectprotected int getImageHeight(javax.servlet.http.HttpServletRequest request)
request
- TODO
{@link IMAGE_HEIGHT_DEFAULT}
protected int getImageWidth(javax.servlet.http.HttpServletRequest request)
request
- TODO
{@link IMAGE_WIDTH_DEFAULT}
protected java.lang.String getDefaultImageFormat()
imageFormat
.
protected int getDefaultImageWidth()
imageWidth
.
protected int getDefaultImageHeight()
imageHeight
.
|
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 |