Package org.springframework.integration

Examples of org.springframework.integration.MessageChannel.send()


        context.getBean("debitChannel", MessageChannel.class);
    Message<Debit> message1 = MessageBuilder.withPayload(
        new Debit(new BigDecimal(5000), "SMALL")).build();
    Message<Debit> message2 = MessageBuilder.withPayload(
        new Debit(new BigDecimal(25000), "BIG")).build();
    debitChannel.send(message1);
    debitChannel.send(message2);
  }

}
View Full Code Here


    Message<Debit> message1 = MessageBuilder.withPayload(
        new Debit(new BigDecimal(5000), "SMALL")).build();
    Message<Debit> message2 = MessageBuilder.withPayload(
        new Debit(new BigDecimal(25000), "BIG")).build();
    debitChannel.send(message1);
    debitChannel.send(message2);
  }

}
View Full Code Here

  public static void main(String[] args) throws InterruptedException {
    ClassPathXmlApplicationContext context =
        new ClassPathXmlApplicationContext("context.xml", JmxDemo.class);
    MessageChannel channel = context.getBean("channel", MessageChannel.class);
    for (int i = 0; i < 1000; i++) {
      channel.send(MessageBuilder.withPayload(i + "").build());
      Thread.sleep(3000);
    }
  }

}
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.