Package org.springframework.integration.core

Examples of org.springframework.integration.core.MessagingTemplate.convertAndSend()


    gateway.setReceiveTimeout(500L);
    gateway.afterPropertiesSet();

    JobConfigurationRequest request = new JobConfigurationRequest();
    request.setXml(IOUtils.toString(new ClassPathResource("/staging-context.xml").getInputStream()));
    gateway.convertAndSend(requests, request);
    assertNotNull("Time out waiting for reply", result);
     assertEquals("[staging]", result.toString());
    
  }
View Full Code Here


    Order order = new Order(orderId);
    order.setEmail(email);
    order.setQuantity(quantity);
    order.setProductId(productId);
    MessagingTemplate template = new MessagingTemplate(this.orderChannel);
    template.convertAndSend(order);
    model.addAttribute("orderId", orderId);
    return "order";
  }

}
View Full Code Here

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("siia/jms/gateways.xml");
    MessageChannel toJMS = context.getBean("toJMS", MessageChannel.class);
    PollableChannel jmsReplies = context.getBean("jmsReplies", PollableChannel.class);
    MessagingTemplate template = new MessagingTemplate();
    template.convertAndSend(toJMS, "echo");
    Object response = template.receiveAndConvert(jmsReplies);
    System.out.println("response: " + response);
  }

}
View Full Code Here

  public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("siia/jms/channel-adapters.xml");
    MessageChannel toJMS = context.getBean("toJMS", MessageChannel.class);
    PollableChannel fromJMS = context.getBean("fromJMS", PollableChannel.class);
    MessagingTemplate template = new MessagingTemplate();
    template.convertAndSend(toJMS, "echo");
    Object response = template.receiveAndConvert(fromJMS);
    System.out.println("response: " + response);
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.