示例#1
0
  @Override
  public int getNumberLastMessage() {
    int numberLastMessage = CHAT_DAO.getLastNumberMessage();

    if (LOG.isInfoEnabled()) {
      LOG.info("get number last message. Number last message : " + numberLastMessage);
    }

    return numberLastMessage;
  }
示例#2
0
  @Override
  public List<Message> getMessageMiss(int number) {
    List<Message> resultMessages = CHAT_DAO.getMessageMiss(number);

    if (LOG.isInfoEnabled()) {
      LOG.info("get miss messages. Messages : " + resultMessages);
    }

    return resultMessages;
  };
示例#3
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");
    }
  }