@Override
  public void addFlight(Flight flight) {
    airportRunaways.addFlight(flight);
    distributor.addTask(flight, Distributor.ACTION_ADD_AIRPLANE);

    if (flight.getFlightState().equals("Ожидает")) {
      serviceStatistics.incAmountReadyTakenOffPlane();
    } else {
      serviceStatistics.incAmountFlewPlane();
    }

    if (LOG.isInfoEnabled()) {
      LOG.info("add flight. Flight : " + flight);
    }
  }
Esempio n. 2
0
  @Override
  public void addMessage(User user, String text) {
    if (text == null || text.isEmpty()) {
      return;
    }

    serviceStatistics.incAmountSendMessage(user);
    CHAT_DAO.addMessage(user, text, new Timestamp(new Date().getTime()));

    if (LOG.isInfoEnabled()) {
      LOG.info("add message");
    }
  }