public class FbBotMillServlet
extends co.aurasphere.botmill.core.base.BotMillServlet
BotDefinition in which the initial configuration is done. If not such
class is found or can't be loaded, a ServletException is thrown during
initialization.
The FbBotMillServlet supports GET requests only for the Subscribing phase and
POST requests for all the Facebook callbacks. For more information about how
the communication is handled, check the documentation for doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse),
doPost(HttpServletRequest, HttpServletResponse) and Facebook's
documentation with the link below.| Constructor and Description |
|---|
FbBotMillServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Specifies how to handle a GET request.
|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Specifies how to handle a POST request.
|
void |
init() |
String |
toString() |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic void init()
init in class co.aurasphere.botmill.core.base.BotMillServletprotected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
FbBotMillNetworkConstants.HUB_MODE_PARAMETER value received
equals to FbBotMillNetworkConstants.HUB_MODE_SUBSCRIBE and that
the FbBotMillNetworkConstants.HUB_VERIFY_TOKEN_PARAMETER value
received equals to the FbBotMillContext.getValidationToken(). If
that's true, then the FbBotMillServlet will reply sending back the value
of the FbBotMillNetworkConstants.HUB_CHALLENGE_PARAMETER
received, in order to confirm the registration, otherwise it will return
an error 403.doGet in class javax.servlet.http.HttpServletreq - the reqresp - the respjavax.servlet.ServletException - the servlet exceptionIOException - Signals that an I/O exception has occurred.protected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
MessengerCallback object. If the request is not a
MessengerCallback, then the FbBotMillServlet logs an error and does
nothing, otherwise it will forward the request to all registered bots in
order to let them process the callbacks.doPost in class javax.servlet.http.HttpServletreq - the reqresp - the respjavax.servlet.ServletException - the servlet exceptionIOException - Signals that an I/O exception has occurred.Copyright © 2017 BotMill. All rights reserved.