OpenNMS API 1.2.3

org.opennms.web.event
Class AcknowledgeEventServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.opennms.web.event.AcknowledgeEventServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AcknowledgeEventServlet
extends javax.servlet.http.HttpServlet

This servlet receives an HTTP POST with a list of events to acknowledge or unacknowledge, and then it redirects the client to a URL for display. The target URL is configurable in the servlet config (web.xml file).

Author:
Lawrence Karnowski , OpenNMS
See Also:
Serialized Form

Field Summary
static java.lang.String ACKNOWLEDGE_ACTION
           
protected  java.lang.String redirectSuccess
          The URL to redirect the client to in case of success.
static java.lang.String UNACKNOWLEDGE_ACTION
           
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
AcknowledgeEventServlet()
           
 
Method Summary
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.
protected  java.lang.String getRedirectString(javax.servlet.http.HttpServletRequest request)
          Convenience method for dynamically creating the redirect URL if necessary.
 void init()
          Looks up the dispath.success parameter in the servlet's config.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, 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

ACKNOWLEDGE_ACTION

public static final java.lang.String ACKNOWLEDGE_ACTION
See Also:
Constant Field Values

UNACKNOWLEDGE_ACTION

public static final java.lang.String UNACKNOWLEDGE_ACTION
See Also:
Constant Field Values

redirectSuccess

protected java.lang.String redirectSuccess
The URL to redirect the client to in case of success.

Constructor Detail

AcknowledgeEventServlet

public AcknowledgeEventServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Looks up the dispath.success parameter in the servlet's config. If not present, this servlet will throw an exception so it will be marked unavailable.

Throws:
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Acknowledge the events specified in the POST and then redirect the client to an appropriate URL for display.

Throws:
javax.servlet.ServletException
java.io.IOException

getRedirectString

protected java.lang.String getRedirectString(javax.servlet.http.HttpServletRequest request)
Convenience method for dynamically creating the redirect URL if necessary.


OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.