예제 #1
0
 /**
  * Gets the expiry time of this device code.
  *
  * @return The expiry time (ms since epoch).
  */
 public long getExpiryTime() {
   final Set<String> value = getParameter(EXPIRE_TIME);
   if (CollectionUtils.isNotEmpty(value)) {
     return Long.parseLong(value.iterator().next());
   }
   return 0;
 }
예제 #2
0
 /**
  * Gets the time that this device code was last polled by the device.
  *
  * @return The last poll time in milliseconds.
  */
 public long getLastPollTime() {
   final String lastQueried = getStringProperty("lastQueried");
   return lastQueried == null ? -1 : Long.valueOf(lastQueried);
 }