Exemplo n.º 1
0
  /**
   * Makes sure the application reacts when the network is available.
   *
   * @param silent If true, wont show the "you are connected..." message to the user.
   */
  @Override
  public void networkCameUp(final boolean silent) {
    // Network came up after a logon
    if (!isLoggedOn()) {
      runDelayedLogon();
      sendLogOn();
    }

    // Network came up after a timeout
    else {
      ui.showTopic();

      if (!silent) {
        msgController.showSystemMessage("You are connected to the network again");
      }

      messages.sendTopicRequestedMessage(getTopic());
      messages.sendExposingMessage();
      messages.sendGetTopicMessage();
      messages.sendExposeMessage();
      messages.sendIdleMessage();
    }
  }
Exemplo n.º 2
0
 /** Sends a message over the network to ask for the current topic. */
 public void sendGetTopicMessage() {
   messages.sendGetTopicMessage();
 }
Exemplo n.º 3
0
 /**
  * Sends the necessary network messages to log the user onto the network and query for the users
  * and state.
  */
 private void sendLogOn() {
   messages.sendLogonMessage();
   messages.sendClient();
   messages.sendExposeMessage();
   messages.sendGetTopicMessage();
 }