示例#1
0
文件: Offer.java 项目: Redor/Openfire
 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;
 }
示例#2
0
文件: Offer.java 项目: Redor/Openfire
 public void reject(AgentSession agentSession) {
   if (pendingSessions.contains(agentSession)) {
     addRejector(agentSession);
     pendingSessions.remove(agentSession);
     agentSession.removeOffer(this);
   }
 }
示例#3
0
文件: Offer.java 项目: Redor/Openfire
 public void removeRejector(AgentSession agentSession) {
   rejections.remove(agentSession.getJID().toBareJID());
   rejectionTimes.remove(agentSession.getJID().toBareJID());
 }
示例#4
0
文件: Offer.java 项目: Redor/Openfire
 private void addRejector(AgentSession agentSession) {
   rejections.add(agentSession.getJID().toBareJID());
   rejectionTimes.put(agentSession.getJID().toBareJID(), new Date());
 }