List of usage examples for org.springframework.integration.xmpp XmppHeaders TO
String TO
To view the source code for org.springframework.integration.xmpp XmppHeaders TO.
Click Source Link
From source file:org.springframework.integration.xmpp.ignore.XmppMessageProducer.java
public Message<String> receive() { try {/* w w w . j av a 2 s .c o m*/ if (counter > 10) { logger.debug("return null"); return null; } counter += 1; Thread.sleep(1000 * 2); String msg = "the current time is " + new Date(); logger.info("sending message to recipient " + recipient); return MessageBuilder.withPayload(msg).setHeader(XmppHeaders.TO, recipient).build(); } catch (InterruptedException e) { logger.debug("exception thrown when trying to receive a message", e); } return null; }