Пример #1
0
 public boolean tooOld() {
   long now = Clock.getInstance().now();
   long earliestValid = now - OFFSET_VALIDITY;
   long latestValid = now + OFFSET_VALIDITY;
   if (_creationDate == null) return true;
   if (_creationDate.getTime() < earliestValid) return true;
   if (_creationDate.getTime() > latestValid) return true;
   return false;
 }
Пример #2
0
 public SessionConfig(Destination dest) {
   _destination = dest;
   _creationDate = new Date(Clock.getInstance().now());
 }