Package org.springframework.integration.core

Examples of org.springframework.integration.core.MessagingTemplate


    factory.setTransactionManager(new ResourcelessTransactionManager());
    factory.setBeanName("step");
    factory.setItemWriter(writer);
    factory.setCommitInterval(4);

    MessagingTemplate gateway = new MessagingTemplate();
    writer.setMessagingOperations(gateway);

    gateway.setDefaultChannel(requests);
    writer.setReplyChannel(replies);
    gateway.setReceiveTimeout(100);

    TestItemWriter.count = 0;

    // Drain queues
    Message<?> message = replies.receive(10);
View Full Code Here


    long orderId = orderIdCounter.getAndIncrement();
    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

 
  @RequestMapping("/admin")
  public @ResponseBody String simple(@RequestBody String message) {
   
    Message<String> operation = MessageBuilder.withPayload(message).build();
    MessagingTemplate template = new MessagingTemplate();
    template.setReceiveTimeout(1000);
    Message response = template.sendAndReceive(inOperationChannel, operation);
    return response != null ? response.getPayload().toString() : null;
   
  }
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

    private MessagingTemplate channelTemplate;


    @Autowired @Qualifier("weatherRequests")
    public void setChannel(MessageChannel messageChannel){
        this.channelTemplate = new MessagingTemplate(messageChannel);
    }
View Full Code Here

TOP

Related Classes of org.springframework.integration.core.MessagingTemplate

Copyright © 2018 www.massapicom. 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.