org.fosstrak.epcis.repository.capture
Class CaptureOperationsServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.fosstrak.epcis.repository.capture.CaptureOperationsServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class CaptureOperationsServlet
- extends javax.servlet.http.HttpServlet
This CaptureOperationsServlet accepts and analyzes HTTP POST requests and
delegates them to the appropriate handler methods in the
CaptureOperationsModule. This servlet also initializes the
CaptureOperationsModule properly and returns a simple information page upon
GET requests.
- Author:
- Marco Steybe
- See Also:
- Serialized Form
|
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
Handles HTTP GET requests by dispatching to simple information pages. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
Implements the EPCIS capture operation. |
void |
init()
|
void |
setCaptureOperationsModule(CaptureOperationsModule captureOperationsModule)
|
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, 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 |
CaptureOperationsServlet
public CaptureOperationsServlet()
init
public void init()
-
- Overrides:
init in class javax.servlet.GenericServlet
doGet
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
throws javax.servlet.ServletException,
IOException
- Handles HTTP GET requests by dispatching to simple information pages.
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Parameters:
req - The servlet request.rsp - The servlet response.
- Throws:
IOException - If an error occurred while writing the response.
javax.servlet.ServletException- See Also:
HttpServlet.doGet(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
doPost
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
throws javax.servlet.ServletException,
IOException
- Implements the EPCIS capture operation. Takes HTTP POST request, extracts
the payload into an XML document, validates the document against the
EPCIS schema, and captures the EPCIS events given in the document. Errors
are caught and returned as simple plaintext messages via HTTP.
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Parameters:
req - The HttpServletRequest.rsp - The HttpServletResponse.
- Throws:
IOException - If an error occurred while validating the request or writing
the response.
javax.servlet.ServletException
setCaptureOperationsModule
public void setCaptureOperationsModule(CaptureOperationsModule captureOperationsModule)
Copyright © 2010. All Rights Reserved.