Package com.calclab.emite.core.events

Examples of com.calclab.emite.core.events.PresenceReceivedEvent


  public void receives(final Message message) {
    eventBus.fireEvent(new MessageReceivedEvent(message));
  }

  public void receives(final Presence presence) {
    eventBus.fireEvent(new PresenceReceivedEvent(presence));
  }
View Full Code Here


    final XMLPacket stanza = XMLBuilder.fromXML(received);
    final String name = stanza.getTagName();
    if (name.equals("message")) {
      eventBus.fireEvent(new MessageReceivedEvent(new Message(stanza)));
    } else if (name.equals("presence")) {
      eventBus.fireEvent(new PresenceReceivedEvent(new Presence(stanza)));
    } else if (name.equals("iq")) {
      eventBus.fireEvent(new IQReceivedEvent(new IQ(stanza)));
    } else
      throw new RuntimeException("WHAT IS THIS? (" + name + "): " + stanza.toString());
View Full Code Here

          eventBus.fireEventFromSource(new RoomChatChangedEvent(ChangeType.opened, this), roomManager);
        }
      }
    }
   
    eventBus.fireEventFromSource(new PresenceReceivedEvent(presence), this);
  }
View Full Code Here

      }
    } else {
      if ("message".equals(name)) {
        eventBus.fireEventFromSource(new MessageReceivedEvent(new Message(stanza)), this);
      } else if ("presence".equals(name)) {
        eventBus.fireEventFromSource(new PresenceReceivedEvent(new Presence(stanza)), this);
      } else if ("iq".equals(name)) {
        final IQ iq = new IQ(stanza);
        final IQ.Type type = iq.getType();
        if (IQ.Type.get.equals(type) || IQ.Type.set.equals(type)) {
          eventBus.fireEventFromSource(new IQRequestReceivedEvent(iq), this);
View Full Code Here

TOP

Related Classes of com.calclab.emite.core.events.PresenceReceivedEvent

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.