1 package org.apache.turbine.services.session; 2 3 18 19 import java.util.Collection ; 20 import javax.servlet.http.HttpSession ; 21 22 import org.apache.turbine.om.security.User; 23 import org.apache.turbine.services.pull.ApplicationTool; 24 25 31 public class SessionTool 32 implements ApplicationTool 33 { 34 public void init(Object o) 35 { 36 } 37 38 public void refresh() 39 { 40 } 41 42 47 public Collection getActiveSessions() 48 { 49 return TurbineSession.getActiveSessions(); 50 } 51 52 58 public void addSession(HttpSession session) 59 { 60 TurbineSession.addSession(session); 61 } 62 63 69 public void removeSession(HttpSession session) 70 { 71 TurbineSession.removeSession(session); 72 } 73 74 85 public boolean isUserLoggedIn(User user) 86 { 87 return TurbineSession.isUserLoggedIn(user); 88 } 89 90 97 public Collection getActiveUsers() 98 { 99 return TurbineSession.getActiveUsers(); 100 } 101 102 108 public User getUserFromSession(HttpSession session) 109 { 110 return TurbineSession.getUserFromSession(session); 111 } 112 113 120 public Collection getSessionsForUser(User user) 121 { 122 return TurbineSession.getSessionsForUser(user); 123 } 124 } 125 | Popular Tags |