sync
[Bookkeeping.git] / src / com / interrupt / bookkeeping / users / UserSession.java
blobf839bb9f27d1b688be2cc352ed372c5e24d8fb90
1 package com.interrupt.bookkeeping.users;
3 import org.apache.log4j.Logger;
5 public class UserSession extends GUserSession implements Runnable {
8 private Logger logger = Logger.getLogger(UserSession.class);
9 private long timeout = 0l;
11 public long getTimeout() {
12 return this.timeout;
14 public void setTimeout(long timeout) {
15 this.timeout = timeout;
18 public void run() {
20 //** keep running until we have reached the timeout threshold
21 logger.debug("UserSession:: BEGIN");
23 long runTime = 0l;
24 long beginTime = java.lang.System.currentTimeMillis();
25 long currentTime = 0l;
27 while(runTime < timeout) {
29 currentTime = java.lang.System.currentTimeMillis();
30 runTime = currentTime - beginTime;
32 //logger.debug("UserSession:: runTime["+runTime+"] / timeout["+timeout+"]");
35 logger.debug("UserSession:: END");
36 ((User)this.getParent()).setAuthenticated(false);