Package com.calclab.emite.im.client.chat

Examples of com.calclab.emite.im.client.chat.Chat


    new ChatManagerEventsSupervisor(chatManager, display);
    chatManager.addChatChangedHandler(new ChatChangedHandler() {
      @Override
      public void onChatChanged(final ChatChangedEvent event) {
        if (event.is(ChangeTypes.created)) {
          final Chat chat = event.getChat();
          listenToChat(chat);
        }
      }
    });
  }
View Full Code Here


    display.printHeader("You need to open the pong example page in order to run the example", Style.important);

    display.printHeader("Ping to: " + other, Style.info);

    new ChatManagerEventsSupervisor(chatManager, display);
    final Chat chat = chatManager.open(other);

    chat.addMessageReceivedHandler(new MessageHandler() {
      @Override
      public void onMessage(final MessageEvent event) {
        display.print(("RECEIVED: " + event.getMessage().getBody()), Style.received);
      }
    });

    // SEND THE FIRST PING WHEN THE CHAT IS READY
    chat.addChatStateChangedHandler(true, new StateChangedHandler() {
      @Override
      public void onStateChanged(final StateChangedEvent event) {
        if (event.is(ChatStates.ready)) {
          sendPing(chat);
        }
View Full Code Here

TOP

Related Classes of com.calclab.emite.im.client.chat.Chat

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.