Package com.calclab.emite.core.client.events

Examples of com.calclab.emite.core.client.events.StateChangedHandler


    output.printHeader("This is ping example", Style.title);
    output.printHeader("Ping to: " + other, Style.info);
    output.printHeader("You need to open the pong example page in order to run the example", Style.important);

    // WHEN LOGGED IN, SEND THE FIRST PING
    session.addSessionStateChangedHandler(true, new StateChangedHandler() {
      @Override
      public void onStateChanged(final StateChangedEvent event) {
        if (event.is(SessionStates.ready)) {
          sendPing();
        }
View Full Code Here


    }.schedule(time);
  }

  private void manageNewRoom(final RoomManager manager, final Room room) {
    display.print("Room created: " + room.getURI(), Style.info);
    room.addChatStateChangedHandler(true, new StateChangedHandler() {
      @Override
      public void onStateChanged(final StateChangedEvent event) {
        if (event.is(ChatStates.ready)) {
          display.print("We entered the room: " + room.getURI(), Style.info);
          pongs++;
View Full Code Here

    new RoomManagerEventsSupervisor(roomManager, display);

    final Room room = (Room) roomManager.open(roomUri);

    // When the room is ready, we invite other
    room.addChatStateChangedHandler(true, new StateChangedHandler() {
      @Override
      public void onStateChanged(final StateChangedEvent event) {
        if (event.is(ChatStates.ready)) {
          display.print("Room ready. Sending invitation to " + otherUri, Style.important);
          pings++;
View Full Code Here

        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.core.client.events.StateChangedHandler

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.