|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectHttpServlet
lt.monarch.chart.servlet.ImageServlet
public abstract class ImageServlet extends HttpServlet
Image encoding servlet. Every HTTP request triggers the createImage
method. The returned image is then encoded and returned to the browser.
| Modifier and Type | Field and Description |
|---|---|
protected AbstractEncoder |
encoder
encoder used for image encoding |
| Constructor and Description |
|---|
ImageServlet()
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.awt.Image |
createImage(HttpServletRequest req)
Requests an image to be created for the HTTP request. |
void |
doGet(HttpServletRequest req,
HttpServletResponse res)
Called by the server to allow a servlet to handle a GET request. |
protected AbstractEncoder |
getEncoder()
Returns an encoder used to encode image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AbstractEncoder encoder
| Constructor Detail |
|---|
public ImageServlet()
| Method Detail |
|---|
protected abstract java.awt.Image createImage(HttpServletRequest req)
throws ServletException
req - servlet requestServletException - if the request for the GET could not be handledprotected AbstractEncoder getEncoder()
lt.monarch.image.png.PNGEncoder.
To use other encoder you should override this method so that it would
return instance of required encoder.
public final void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
java.io.IOException
createImage method. The returned image is then encoded and
returned to the browser.
req - an HttpServletRequest object that contains the request the
client has made of the servletres - an HttpServletResponse object that contains the response
the servlet sends to the clientServletException - if the request for the GET could not be handledjava.io.IOException - if an input or output error is detected when the servlet
handles the GET request
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||