public abstract class MM7ReceiverServlet
extends javax.servlet.http.HttpServlet
When using MM7 for multimedia message reception in a J2EE webapplication,
you must extend this class and implement the getService()
method.
Your derived servlet must be installed in the Servlet-Container and the MM7
MMSC must be informed about the URL of this servlet so that it can deliver
messages / reports to your application.
Constructor and Description |
---|
MM7ReceiverServlet() |
Modifier and Type | Method and Description |
---|---|
MMSStatus |
dispatch(javax.servlet.http.HttpServletRequest request,
MMSDeliveryReport incomming)
Invokes the registered
MMSListener . |
MMSStatus |
dispatch(javax.servlet.http.HttpServletRequest request,
MMSMessage incomming)
Invokes the registered
MMSListener . |
MMSStatus |
dispatch(javax.servlet.http.HttpServletRequest request,
MMSReadReport incomming)
Invokes the registered
MMSListener . |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process an HTTP POST request.
|
abstract MMSService |
getService()
Return the MMSService instance that processes incoming messages / reports
(by means of the registered
MMSListener ). |
static boolean |
isMM7Request(javax.servlet.http.HttpServletRequest request)
Determine if a Request is a MM7 POST request from a MMSC.
|
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
This method will parse the MM7 SOAP Request, extract
the embedded message or report and invokes the corresponding method of the
MMSListener
implementation for a specific MMS Service.
If no MMSListener is available, this method will respond with the HTTP Server Response Code 503 (Service Unavailable).
doPost
in class javax.servlet.http.HttpServlet
request
- The HTTP request objectresponse
- The HTTP Response objectjavax.servlet.ServletException
- if the Request could not be processed.java.io.IOException
- if an I/O error occurred.dispatch(HttpServletRequest, MMSMessage)
,
dispatch(HttpServletRequest, MMSDeliveryReport)
,
dispatch(HttpServletRequest, MMSReadReport)
public MMSStatus dispatch(javax.servlet.http.HttpServletRequest request, MMSMessage incomming)
MMSListener
.
This method is invoked by doPost(HttpServletRequest, HttpServletResponse)
after the input-stream has been parsed.
It offers the possibility to extract additional information from the request and to add them to the message by using MMSMessage.setProperty(String, Object)
.request
- The HTTP request objectincomming
- The parsed messageMMSListener
.public MMSStatus dispatch(javax.servlet.http.HttpServletRequest request, MMSDeliveryReport incomming)
MMSListener
.
This method is invoked by doPost(HttpServletRequest, HttpServletResponse)
after the input-stream has been parsed.request
- The HTTP request objectincomming
- The parsed messageMMSListener
.public MMSStatus dispatch(javax.servlet.http.HttpServletRequest request, MMSReadReport incomming)
MMSListener
.
This method is invoked by doPost(HttpServletRequest, HttpServletResponse)
after the input-stream has been parsed.request
- The HTTP request objectincomming
- The parsed messageMMSListener
.public abstract MMSService getService()
MMSListener
).public static boolean isMM7Request(javax.servlet.http.HttpServletRequest request)
request
- the request to examine.object XP, Inc. © 2000-2013. All rights reserved object XP