test_class.declarator: orderMailer
test_class.original_string: OrderMailer orderMailer;
test_class.type: OrderMailer
test_class.var_name: orderMailer
test_class.file: plugins/rapid_mailer/java_src/com/demo/mailer/OrderMailerTest.java
test_class.identifier: OrderMailerTest
test_case.body: @Test
  	public void testSendFromOrderMailer() throws TemplateException, IOException, Exception {
  		AsyncToken token = orderMailer.sendConfirmOrder("badqiu");
  		
  		//waitForResult主要用于测试，请使用相同功能的Future.get()
  		token.waitForResult();
  	}
test_case.class_method_signature: OrderMailerTest.testSendFromOrderMailer()
test_case.full_signature: @Test public void testSendFromOrderMailer()
test_case.identifier: testSendFromOrderMailer
test_case.invocations: sendConfirmOrder waitForResult
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSendFromOrderMailer()
focal_class.file: plugins/rapid_mailer/java_src/com/demo/mailer/OrderMailer.java
focal_class.identifier: OrderMailer
focal_class.class_method_signature: OrderMailer.createConfirmOrder(String username)
focal_class.full_signature: public SimpleMailMessage createConfirmOrder(String username)
focal_class.identifier: createConfirmOrder
focal_class.modifiers: public
focal_class.parameters: (String username)
focal_class.return: SimpleMailMessage
focal_class.signature: SimpleMailMessage createConfirmOrder(String username)
focal_class.class_method_signature: OrderMailer.sendConfirmOrder(final String username)
focal_class.full_signature: public AsyncToken sendConfirmOrder(final String username)
focal_class.identifier: sendConfirmOrder
focal_class.modifiers: public
focal_class.parameters: (final String username)
focal_class.return: AsyncToken
focal_class.signature: AsyncToken sendConfirmOrder(final String username)
focal_class.superclass: extends BaseMailer
focal_method.body: public AsyncToken sendConfirmOrder(final String username) {
  		final SimpleMailMessage msg = createConfirmOrder(username);
  		
  		//转换为html邮件并发送,另有一个参数可以指定发件人名称
  		AsyncToken token = getAsyncJavaMailSender().send(SimpleMailMessageUtils.toHtmlMsg(msg,"rapid小明")); 
  		
  		//处理邮件发送结果
  		token.addResponder(new IResponder() {
  			public void onFault(Exception fault) {
  				System.out.println("[ERROR] confirmOrder mail send fail,cause:"+fault);
  			}
  			public void onResult(Object result) {
  				System.out.println("[INFO] confirmOrder mail send success");
  			}
  		});
  		
  		//返回token可以用于外部继续监听
  		return token;
  	}
focal_method.class_method_signature: OrderMailer.sendConfirmOrder(final String username)
focal_method.full_signature: public AsyncToken sendConfirmOrder(final String username)
focal_method.identifier: sendConfirmOrder
focal_method.invocations: createConfirmOrder send getAsyncJavaMailSender toHtmlMsg addResponder println println
focal_method.modifiers: public
focal_method.parameters: (final String username)
focal_method.return: AsyncToken
focal_method.signature: AsyncToken sendConfirmOrder(final String username)