public static boolean isExpired(MultiMap headers,Long timestamp){
  if (headers != null && timestamp != null) {
    Integer queueExpireAfter=getQueueExpireAfter(headers);
    Integer expireAfter=getExpireAfter(headers);
    if (queueExpireAfter != null) {
      expireAfter=queueExpireAfter;
    }
    if (expireAfter != null) {
      long expiredSince=System.currentTimeMillis() - (timestamp + expireAfter * 1000L);
      if (expiredSince > 0) {
        log.debug(" > isExpired - Request expired since {} milliseconds.",expiredSince);
        return true;
      }
 else {
        log.debug(" > isExpired - Request not expired (would expire in {} milliseconds).",-expiredSince);
        return false;
      }
    }
  }
  return false;
}

public static boolean isExpired ( MultiMap headers , Long timestamp ) { if ( headers != null && timestamp != null ) { Integer queueExpireAfter = getQueueExpireAfter ( headers ) ; Integer expireAfter = getExpireAfter ( headers ) ; if ( queueExpireAfter != null ) { expireAfter = queueExpireAfter ; } if ( expireAfter != null ) { long expiredSince = System . currentTimeMillis ( ) - ( timestamp + expireAfter * 1000L ) ; if ( expiredSince > 0 ) { log . debug ( " > isExpired - Request expired since {} milliseconds." , expiredSince ) ; return true ; } else { log . debug ( " > isExpired - Request not expired (would expire in {} milliseconds)." , - expiredSince ) ; return false ; } } } return false ; }
checks the expiration based on the given headers and a timstamp in milliseconds .
