public class FbBotMillBean extends Object
| Constructor and Description |
|---|
FbBotMillBean() |
| Modifier and Type | Method and Description |
|---|---|
protected FbBotMillEventType |
eventKind(MessageEnvelope envelope)
Returns the kind of callback received for the current envelope.
|
protected LocationCoordinates |
getLocationMessage(MessageEnvelope envelope)
Retrieves the location from an envelope.
|
protected String |
safeGetMessage(MessageEnvelope envelope)
Retrieves a text message from an envelope.
|
protected String |
safeGetPostbackPayload(MessageEnvelope envelope)
Retrieves a text message from an envelope.
|
protected String |
safeGetQuickReplyPayload(MessageEnvelope envelope)
Retrieves a quick reply payload from an envelope.
|
protected User |
safeGetRecipient(MessageEnvelope envelope)
Retrieves the recipient from an envelope.
|
protected String |
safeGetRecipientId(MessageEnvelope envelope)
Retrieves the recipient ID from an envelope.
|
protected User |
safeGetSender(MessageEnvelope envelope)
Retrieves the sender from an envelope.
|
protected String |
safeGetSenderId(MessageEnvelope envelope)
Retrieves the sender ID from an envelope.
|
String |
toString() |
protected boolean |
validate(FbBotMillResponse response)
Validates the
FbBotMillResponse. |
protected String safeGetMessage(MessageEnvelope envelope)
envelope - the message envelope.protected String safeGetQuickReplyPayload(MessageEnvelope envelope)
envelope - the message envelope.protected String safeGetPostbackPayload(MessageEnvelope envelope)
envelope - the message envelope.protected String safeGetRecipientId(MessageEnvelope envelope)
envelope - the message envelope.protected String safeGetSenderId(MessageEnvelope envelope)
envelope - the message envelope.protected User safeGetRecipient(MessageEnvelope envelope)
envelope - the message envelope.User containing the recipient if found, empty
otherwise. It never returns null.protected LocationCoordinates getLocationMessage(MessageEnvelope envelope)
envelope - the message envelopeLocationCoordinates containing the coordinates that the
user sets from the quick reply location payload.protected User safeGetSender(MessageEnvelope envelope)
envelope - the message envelope.User containing the sender if found, empty otherwise.
It never returns null.protected FbBotMillEventType eventKind(MessageEnvelope envelope)
envelope - the envelope to inspect.FbBotMillEventType representing the current callback
type.protected boolean validate(FbBotMillResponse response)
FbBotMillResponse.response - the responseCopyright © 2017 BotMill. All rights reserved.