Class AppEngineNotificationServlet (2.0.1)

public class AppEngineNotificationServlet extends HttpServlet

Beta
Thread-safe Webhook App Engine Servlet to receive notifications.

In order to use this servlet you need to register the servlet in your web.xml. You may optionally extend AppEngineNotificationServlet with custom behavior.

It is a simple wrapper around WebhookUtils#processWebhookNotification(HttpServletRequest, HttpServletResponse, DataStoreFactory) that uses AppEngineDataStoreFactory#getDefaultInstance(), so you may alternatively call that method instead from your HttpServlet#doPost with no loss of functionality. Sample web.xml setup:


 {@literal <}servlet{@literal>}
 {@literal <}servlet-name{@literal>}AppEngineNotificationServlet{@literal <} ervlet-name{@literal="">}
 {@literal <}servlet-class{@literal>}com.google.api.client.googleapis.extensions.appengine.notifications.AppEngineNotificationServlet{@literal <} ervlet-class{@literal="">}
 {@literal <} ervlet{@literal="">}
 {@literal <}servlet-mapping{@literal>}
 {@literal <}servlet-name{@literal>}AppEngineNotificationServlet{@literal <} ervlet-name{@literal="">}
 {@literal <}url-pattern{@literal>}/notifications{@literal <} rl-pattern{@literal="">}
 {@literal <} ervlet-mapping{@literal="">}
 

Inheritance

java.lang.Object > javax.servlet.GenericServlet > HttpServlet > AppEngineNotificationServlet

Constructors

AppEngineNotificationServlet()

public AppEngineNotificationServlet()

Methods

doPost(HttpServletRequest req, HttpServletResponse resp)

protected void doPost(HttpServletRequest req, HttpServletResponse resp)
Parameters
NameDescription
reqHttpServletRequest
respHttpServletResponse
Overrides Exceptions
TypeDescription
ServletException
IOException