public long getSessionTime() { try { Property property = getPropertyObject(SESSION_TIME); // stored in milliseconds, pass back as minutes long b = Long.parseLong(property.getValue()); return (b / MILLIS_IN_MINUTE); } catch (Exception e) { // default session time to five minutes if not set yet return DEFAULT_SESSION_TIME_IN_MINUTES; } }
public void setCacheTime(long cacheTime) { // comes in as minutes, store in milliseconds setProperty(CACHE_TIME, Long.toString(cacheTime * MILLIS_IN_MINUTE)); }
public void setSessionTime(long time) { // comes in as minutes, store in milliseconds setProperty(SESSION_TIME, Long.toString(time * MILLIS_IN_MINUTE)); }