Beispiel #1
0
 public boolean isRejector(AgentSession agentSession) {
   Date rejectionTime = rejectionTimes.get(agentSession.getJID().toBareJID());
   boolean rejector = false;
   if (rejectionTime != null) {
     if (rejectionTime.getTime() > System.currentTimeMillis() - rejectionTimeout) {
       rejector = true;
     } else {
       rejectionTimes.remove(agentSession.getJID().toBareJID());
     }
   }
   return rejector;
 }
Beispiel #2
0
 public void removeRejector(AgentSession agentSession) {
   rejections.remove(agentSession.getJID().toBareJID());
   rejectionTimes.remove(agentSession.getJID().toBareJID());
 }
Beispiel #3
0
 private void addRejector(AgentSession agentSession) {
   rejections.add(agentSession.getJID().toBareJID());
   rejectionTimes.put(agentSession.getJID().toBareJID(), new Date());
 }