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; }
public SessionConfig(Destination dest) { _destination = dest; _creationDate = new Date(Clock.getInstance().now()); }