|
OpenNMS API 1.2.3 | |||||||||
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.opennms.web.graph.RRDGraphServlet
A servlet that creates a graph of network performance data using the RRDTool .
This servlet executes an rrdtool graph command in another process,
piping its PNG file to standard out. The servlet then reads that PNG file and
returns it on the ServletOutputStream
.
This servlet requires the following parameters:
Field Summary | |
protected java.lang.String |
commandPrefix
The prefix for the RRDtool command (including the executable's pathname) as specified in the rrdtool-graph properties file. |
protected java.lang.String |
mimeType
The mime type of the image we will return. |
protected java.util.Map |
reportMap
Holds the graph definitions specified in the rrdtool-graph properties file. |
protected java.io.File |
workDir
The working directory as specifed in the rrdtool-graph properties file. |
Fields inherited from class javax.servlet.http.HttpServlet |
|
Fields inherited from class javax.servlet.GenericServlet |
|
Constructor Summary | |
RRDGraphServlet()
|
Method Summary | |
protected java.lang.String |
createPrefabCommand(javax.servlet.http.HttpServletRequest request,
java.lang.String reportName,
java.lang.String[] rrds,
java.lang.String propertiesFile,
java.lang.String start,
java.lang.String end)
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Checks the parameters passed to this servlet, and if all are okay, executes the RRDTool command in another process and pipes its PNG output to the ServletOutputStream back to the requesting web
browser. |
void |
init()
Initializes this servlet by reading the rrdtool-graph properties file. |
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 |
protected java.io.File workDir
protected java.lang.String commandPrefix
protected java.lang.String mimeType
protected java.util.Map reportMap
PrefabGraph
instances.
Constructor Detail |
public RRDGraphServlet()
Method Detail |
public void init() throws javax.servlet.ServletException
javax.servlet.ServletException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
ServletOutputStream
back to the requesting web
browser.
javax.servlet.ServletException
java.io.IOException
protected java.lang.String createPrefabCommand(javax.servlet.http.HttpServletRequest request, java.lang.String reportName, java.lang.String[] rrds, java.lang.String propertiesFile, java.lang.String start, java.lang.String end) throws javax.servlet.ServletException
javax.servlet.ServletException
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |