public abstract class FbBot extends Object implements co.aurasphere.botmill.core.BotDefinition
BotDefinition implementation.| Modifier and Type | Field and Description |
|---|---|
protected FbBotMillEvent |
event
The
FbBotMillEvent object created by this class for each
annotated method. |
| Constructor and Description |
|---|
FbBot()
Base constructor.
|
FbBot(co.aurasphere.botmill.core.BotMillPolicy botmillPolicy)
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionFrame(ActionFrame actionFrame)
Adds an
ActionFrame to this bot. |
void |
addActionFrame(FbBotMillEvent event,
AutoReply... replies)
Adds an
ActionFrame to this bot with multiple reply. |
void |
addActionFrame(FbBotMillEvent event,
AutoReply reply)
Adds an
ActionFrame to this bot. |
protected co.aurasphere.botmill.core.BotMillSession |
botMillSession()
Bot mill session.
|
void |
defineBehaviour()
This is the method to define the behaviour of the bot.
|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
processMessage(MessageEnvelope envelope)
Checks if there's any registered
FbBotMillEvent for the incoming
callback. |
protected void |
reply(AutoReply... replies)
This method is used to create multiple replies.
|
protected void |
reply(AutoReply reply)
This method is used to create a reply.
|
String |
toString() |
protected FbBotMillEvent event
FbBotMillEvent object created by this class for each
annotated method.public FbBot(co.aurasphere.botmill.core.BotMillPolicy botmillPolicy)
botmillPolicy - the policy this bot should follow.public FbBot()
public void defineBehaviour()
defineBehaviour in interface co.aurasphere.botmill.core.BotDefinitionpublic void addActionFrame(ActionFrame actionFrame)
ActionFrame to this bot.actionFrame - the actionFrame to add.public void addActionFrame(FbBotMillEvent event, AutoReply reply)
ActionFrame to this bot.event - the FbBotMillEvent to handle.reply - the AutoReply which should handle the event.public void addActionFrame(FbBotMillEvent event, AutoReply... replies)
ActionFrame to this bot with multiple reply.event - the FbBotMillEvent to handle.replies - the collection of AutoReply which should handle the
event.protected void reply(AutoReply reply)
reply - the replyprotected void reply(AutoReply... replies)
replies - the set of replies in a form of a var-argsprotected final co.aurasphere.botmill.core.BotMillSession botMillSession()
public void processMessage(MessageEnvelope envelope)
FbBotMillEvent for the incoming
callback. If there's any, then the callback is handled. The chain will be
processed according to the BotMillPolicy followed by this bot. If
the policy is BotMillPolicy.FIRST_ONLY, the chain will be
processed until the first callback matches. Otherwise, if the policy is
BotMillPolicy.PROCESS_ALL, all the chain will always be
processed.envelope - the incoming message.Copyright © 2017 BotMill. All rights reserved.