当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationUtils.setBotDefinitionInstance方法代码示例

本文整理汇总了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();

}
 
开发者ID:BotMill,项目名称:kik-botmill,代码行数:19,代码来源:IncomingToOutgoingMessageHandlerTest.java

示例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());

}
 
开发者ID:BotMill,项目名称:kik-botmill,代码行数:21,代码来源:TestAnnotatedDomain.java

示例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();
	
}
 
开发者ID:BotMill,项目名称:kik-botmill,代码行数:27,代码来源:IncomingMessageBuilderTest.java

示例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();
}
 
开发者ID:BotMill,项目名称:kik-botmill,代码行数:23,代码来源:JsonToActionFrameTest.java

示例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();
}
 
开发者ID:BotMill,项目名称:kik-botmill,代码行数:22,代码来源:OutgoingMessageBuilderTest.java

示例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();
}
 
开发者ID:BotMill,项目名称:kik-botmill,代码行数:19,代码来源:BasicOutgoingMessageTest.java

示例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();
	}
}
 
开发者ID:BotMill,项目名称:fb-botmill,代码行数:26,代码来源:AnnotatedTemplateTest.java

示例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);
}
 
开发者ID:BotMill,项目名称:fb-botmill,代码行数:11,代码来源:AnnotatedTemplateTest.java


注:本文中的co.aurasphere.botmill.core.internal.util.ConfigurationUtils.setBotDefinitionInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。