本文整理汇总了Java中co.aurasphere.botmill.core.internal.util.ConfigurationUtils.setBotDefinitionInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationUtils.setBotDefinitionInstance方法的具体用法?Java ConfigurationUtils.setBotDefinitionInstance怎么用?Java ConfigurationUtils.setBotDefinitionInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类co.aurasphere.botmill.core.internal.util.ConfigurationUtils
的用法示例。
在下文中一共展示了ConfigurationUtils.setBotDefinitionInstance方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
@Before
public void setup() {
StandardPBEStringEncryptor enc = new StandardPBEStringEncryptor();
enc.setPassword("password"); // can be sourced out
ConfigurationUtils.loadEncryptedConfigurationFile(enc, "botmill.properties");
List<BotDefinition> botDefinitions = new ArrayList<BotDefinition>();
botDefinitions.add(new AnnotatedDomain());
ConfigurationUtils.setBotDefinitionInstance(botDefinitions);
ConfigurationBuilder.getInstance().setWebhook("https://kik-bot-021415.herokuapp.com/kikbot")
.setManuallySendReadReceipts(false).setReceiveDeliveryReceipts(false).setReceiveIsTyping(true)
.setReceiveReadReceipts(false)
.setStaticKeyboard(KeyboardBuilder.getInstance().addResponse(MessageFactory.createTextResponse("BODY"))
.setType(KeyboardType.SUGGESTED).buildKeyboard())
.buildConfiguration();
}
示例2: setup
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
/**
* Setup.
*/
@Before
public void setup() {
ConfigurationUtils.loadEncryptedConfigurationProperties();
List<BotDefinition> botDefinitions = new ArrayList<BotDefinition>();
botDefinitions.add(new AnnotatedDomain());
ConfigurationUtils.setBotDefinitionInstance(botDefinitions);
NetworkUtils.postJsonConfig(ConfigurationBuilder.getInstance()
.setWebhook("https://kik-bot-021415.herokuapp.com/kikbot").setManuallySendReadReceipts(false)
.setReceiveDeliveryReceipts(false).setReceiveIsTyping(true).setReceiveReadReceipts(false)
.setStaticKeyboard(KeyboardBuilder.getInstance()
.addResponse(MessageFactory.createTextResponse("BODY"))
.setType(KeyboardType.SUGGESTED).buildKeyboard())
.buildConfiguration());
}
示例3: setup
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
/**
* Setup.
*/
@Before
public void setup() {
StandardPBEStringEncryptor enc = new StandardPBEStringEncryptor();
enc.setPassword("password"); // can be sourced out
ConfigurationUtils.loadEncryptedConfigurationFile(enc, "botmill.properties");
List<BotDefinition> botDefinitions = new ArrayList<BotDefinition>();
botDefinitions.add(new AnnotatedDomain());
ConfigurationUtils.setBotDefinitionInstance(botDefinitions);
ConfigurationBuilder.getInstance()
.setWebhook("https://kik-bot-021415.herokuapp.com/kikbot")
.setManuallySendReadReceipts(false)
.setReceiveDeliveryReceipts(false)
.setReceiveIsTyping(true)
.setReceiveReadReceipts(false)
.setStaticKeyboard(
KeyboardBuilder.getInstance()
.addResponse(MessageFactory.createTextResponse("BODY"))
.setType(KeyboardType.SUGGESTED).buildKeyboard())
.buildConfiguration();
}
示例4: setup
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
/**
* Setup.
*/
@Before
public void setup() {
StandardPBEStringEncryptor enc = new StandardPBEStringEncryptor();
enc.setPassword("password"); // can be sourced out
ConfigurationUtils.loadEncryptedConfigurationFile(enc, "botmill.properties");
List<BotDefinition> botDefinitions = new ArrayList<BotDefinition>();
botDefinitions.add(new AnnotatedDomain());
ConfigurationUtils.setBotDefinitionInstance(botDefinitions);
ConfigurationBuilder.getInstance()
.setWebhook("https://kik-bot-021415.herokuapp.com/kikbot")
.setManuallySendReadReceipts(false)
.setReceiveDeliveryReceipts(false)
.setReceiveIsTyping(true)
.setReceiveReadReceipts(false)
.buildConfiguration();
}
示例5: setUp
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
/**
* Sets the up.
*/
@Before
public void setUp() {
StandardPBEStringEncryptor enc = new StandardPBEStringEncryptor();
enc.setPassword("password"); // can be sourced out
ConfigurationUtils.loadEncryptedConfigurationFile(enc, "botmill.properties");
List<BotDefinition> botDefinitions = new ArrayList<BotDefinition>();
botDefinitions.add(new AnnotatedDomain());
ConfigurationUtils.setBotDefinitionInstance(botDefinitions);
ConfigurationBuilder.getInstance()
.setWebhook("https://kik-bot-021415.herokuapp.com/kikbot")
.setManuallySendReadReceipts(false)
.setReceiveDeliveryReceipts(false)
.setReceiveIsTyping(true)
.setReceiveReadReceipts(false)
.buildConfiguration();
}
示例6: setUp
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
@Before
public void setUp() {
StandardPBEStringEncryptor enc = new StandardPBEStringEncryptor();
enc.setPassword("password"); // can be sourced out
ConfigurationUtils.loadEncryptedConfigurationFile(enc, "botmill.properties");
List<BotDefinition> botDefinitions = new ArrayList<BotDefinition>();
botDefinitions.add(new AnnotatedDomain());
ConfigurationUtils.setBotDefinitionInstance(botDefinitions);
ConfigurationBuilder.getInstance()
.setWebhook("https://kik-bot-021415.herokuapp.com/kikbot")
.setManuallySendReadReceipts(false)
.setReceiveDeliveryReceipts(false)
.setReceiveIsTyping(true)
.setReceiveReadReceipts(false)
.buildConfiguration();
}
示例7: main
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
public static void main(String[] args) {
StandardPBEStringEncryptor enc = new StandardPBEStringEncryptor();
enc.setPassword("password"); // can be sourced out
ConfigurationUtils.loadEncryptedConfigurationFile(enc, "botmill.properties");
List<BotDefinition> botDef = new ArrayList<BotDefinition>();
botDef.add(new AnnotatedTemplatedBehaviourTest());
ConfigurationUtils.loadBotConfig();
ConfigurationUtils.setBotDefinitionInstance(botDef);
for(int i=0;i<10;i++) {
new Thread(new Runnable() {
String json = "{\"sender\":{\"id\":\"1158621824216736\"},\"recipient\":{\"id\":\"1226565047419159\"},\"timestamp\":1490832021661,\"message\":{\"mid\":\"mid.$cAAUPCFn4ymdhTcignVbHH3rzpKd_\",\"seq\":844819,\"text\":\"Hi!\"}}";
MessageEnvelope envelope = FbBotMillJsonUtils.fromJson(json, MessageEnvelope.class);
@Override
public void run() {
try {
IncomingToOutgoingMessageHandler.getInstance().process(envelope);
}catch(Exception e) {
e.printStackTrace();
}
}
}).start();
}
}
示例8: setup
import co.aurasphere.botmill.core.internal.util.ConfigurationUtils; //导入方法依赖的package包/类
@Before
public void setup() {
Assume.assumeTrue(isConfigurationExist());
FbBotMillContext.getInstance().setup(System.getenv("fb.page.token"), System.getenv("fb.validation.token"));
// Load the Bot manually.
List<BotDefinition> botDefs = new ArrayList<BotDefinition>();
botDefs.add(new AnnotatedTemplatedBehaviourTest());
ConfigurationUtils.setBotDefinitionInstance(botDefs);
}