public class FbBotMillMockMediator extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
forward(MessageEnvelope envelope)
Forwards an envelope to the registered bots.
|
static String |
getFacebookMockId()
Gets the
facebookMockId. |
static FbBotMillMockMediator |
getInstance(String facebookMockId,
Class<? extends FbBotDefinition>... fbBotDefinitions)
Constructor that registers a mocked page-scoped user ID as a recipient
and instantiates and registers a list of
FbBotDefinition classes. |
static FbBotMillMockMediator |
getInstance(String facebookMockId,
FbBotDefinition... fbBotDefinitions)
Constructor that registers a mocked page-scoped user ID as a recipient
and a list of
FbBotDefinition. |
void |
interactiveTest()
Starts an interactive test that simulates the behavior of the bot
according to the chat inputs.
|
static boolean |
isMockEnabled()
Checks if is mock enabled.
|
void |
sendPayload(String payload)
Sends a payload to all the registered bots.
|
void |
sendQuickReplyPayload(String payload)
Sends a quickreply to all the registered bots.
|
void |
sendTextMessage(String message)
Sends a text message to all the registered bots.
|
String |
toString() |
public static FbBotMillMockMediator getInstance(String facebookMockId, FbBotDefinition... fbBotDefinitions)
FbBotDefinition.facebookMockId - the facebookMockId.fbBotDefinitions - a list of FbBotDefinition to register.@SafeVarargs public static FbBotMillMockMediator getInstance(String facebookMockId, Class<? extends FbBotDefinition>... fbBotDefinitions)
FbBotDefinition classes.facebookMockId - the facebookMockId.fbBotDefinitions - a list of classes implementing FbBotDefinition.public void sendTextMessage(String message)
message - the message to send.public void sendPayload(String payload)
payload - the payload to send.public void sendQuickReplyPayload(String payload)
payload - the payload to send.public void forward(MessageEnvelope envelope)
envelope - the envelope to forward.public void interactiveTest()
public static boolean isMockEnabled()
mockEnabled.public static String getFacebookMockId()
facebookMockId.facebookMockId.Copyright © 2017 BotMill. All rights reserved.