Package com.calclab.emite.xep.chatstate.ChatStateHook

Examples of com.calclab.emite.xep.chatstate.ChatStateHook.ChatState


  }

  @Override
  public void onMessageReceived(final MessageReceivedEvent event) {
    final Message message = event.getMessage();
    final ChatState state = getStateFromMessage(message);
    if (state != null) {
      final XmppURI from = message.getFrom();
      othersState.put(from, state);
      eventBus.fireEventFromSource(new RoomChatStateNotificationEvent(message.getFrom(), state), this);
    }
View Full Code Here


  public HandlerRegistration addRoomChatStateNotificationHandler(final RoomChatStateNotificationEvent.Handler handler) {
    return eventBus.addHandlerToSource(RoomChatStateNotificationEvent.TYPE, this, handler);
  }

  public ChatState getOtherState(final XmppURI occupantUri) {
    final ChatState state = othersState.get(occupantUri);
    return state == null ? ChatState.active : state;
  }
View Full Code Here

TOP

Related Classes of com.calclab.emite.xep.chatstate.ChatStateHook.ChatState

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.