Package com.calclab.emite.im.chat

Examples of com.calclab.emite.im.chat.Chat.addMessageReceivedHandler()


  @Test
  public void shouldForwardMessagesToChats() {
    final Chat chat = manager.open(OTHER);
    final MessageReceivedTestHandler handler = new MessageReceivedTestHandler();
    chat.addMessageReceivedHandler(handler);
    session.receives(new Message("body", ME, OTHER));
    assertEquals(1, handler.getCalledTimes());
    session.receives("<message type='chat' id='purplee8b92642' to='me@localhost' " + "from='other@localhost'><x xmlns='jabber:x:event'/><active"
        + "xmlns='http://jabber.org/protocol/chatstates'/></message>");
    assertEquals(2, handler.getCalledTimes());
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.