Java Doc for SessionFacade.java in  » Forum » JForum-2.1.8 » net » jforum » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Forum » JForum 2.1.8 » net.jforum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.jforum.SessionFacade

SessionFacade
public class SessionFacade implements Cacheable(Code)

author:
   Rafael Steil
version:
   $Id: SessionFacade.java,v 1.40 2007/09/20 16:07:10 rafaelsteil Exp $




Method Summary
public static  voidadd(UserSession us)
     Add a new UserSession entry to the session.
public static  voidadd(UserSession us, String sessionId)
     Registers a new UserSession .

If a call to UserSession.getUserId return a value different of SystemGlobals.getIntValue(ConfigKeys.ANONYMOUS_USER_ID), then the user will be registered as "logged".

public static  intanonymousSize()
    
public static  voidclear()
    
public static  ListgetAllSessions()
     Get all registered sessions ArrayList with the sessions.
public static  ObjectgetAttribute(String name)
    
public static  ListgetLoggedSessions()
    
public static  MapgetTopicsReadTime()
     Returns a map containing information about read time of a set of topics. a map where the key is the topicId represented as an Integer, and thevalue is a Long representing the read time of such topic.
public static  MapgetTopicsReadTimeByForum()
    
public static  UserSessiongetUserSession()
    
public static  UserSessiongetUserSession(String sessionId)
     Gets an UserSession by the session id.
public static  booleanisLogged()
     Verify is the user is logged in.
public static  StringisUserInSession(String username)
    
public static  StringisUserInSession(int userId)
     Verify if there is an user in the session with the user id passed as parameter.
public static  voidmakeLogged()
    
public static  voidmakeUnlogged()
    
public static  intregisteredSize()
    
public static  voidremove(String sessionId)
    
public static  voidremoveAttribute(String name)
    
public static  voidsetAttribute(String name, Object value)
    
public  voidsetCacheEngine(CacheEngine engine)
    
public static  intsize()
     Gets the number of session elements.
public static  voidstoreSessionData(String sessionId)
     Persists user session information. This method will get a Connection making a call to DBConnection.getImplementation().getConnection(), and then releasing the connection after the method is processed.
public static  voidstoreSessionData(String sessionId, Connection conn)
     Persists user session information.
Parameters:
  sessionId - The session which we're going to persist
Parameters:
  conn - A Connection to be used to connect tothe database.



Method Detail
add
public static void add(UserSession us)(Code)
Add a new UserSession entry to the session. This method will make a call to JForum.getRequest.getSession().getId() to retrieve the session's id
Parameters:
  us - The user session objetc to add
See Also:   SessionFacade.add(UserSession,String)



add
public static void add(UserSession us, String sessionId)(Code)
Registers a new UserSession .

If a call to UserSession.getUserId return a value different of SystemGlobals.getIntValue(ConfigKeys.ANONYMOUS_USER_ID), then the user will be registered as "logged". Otherwise it will enter as anonymous.

Please note that, in order to keep the number of guest and logged users correct, it's caller's responsability to SessionFacade.remove(String) the record before adding it again if the current session is currently represented as "guest".


Parameters:
  us - the UserSession to add
Parameters:
  sessionId - the user's session id



anonymousSize
public static int anonymousSize()(Code)
Get the number of anonymous users the nuber of anonymous users



clear
public static void clear()(Code)



getAllSessions
public static List getAllSessions()(Code)
Get all registered sessions ArrayList with the sessions. Each entryis an UserSession object.



getAttribute
public static Object getAttribute(String name)(Code)
Gets an attribute value given its name
Parameters:
  name - The attribute name to retrieve the value The value as an Object, or null if no entry was found



getLoggedSessions
public static List getLoggedSessions()(Code)
Gets the UserSession instance of all logged users A list with the user sessions



getTopicsReadTime
public static Map getTopicsReadTime()(Code)
Returns a map containing information about read time of a set of topics. a map where the key is the topicId represented as an Integer, and thevalue is a Long representing the read time of such topic.



getTopicsReadTimeByForum
public static Map getTopicsReadTimeByForum()(Code)
Returns a map with "all topics read" flags for some forum a map where the key is the forum id represented as an Integer, and the value is a Long representing the read time to be used in the verifications.



getUserSession
public static UserSession getUserSession()(Code)
Gets the user's UserSession object The UserSession associated to the user's session



getUserSession
public static UserSession getUserSession(String sessionId)(Code)
Gets an UserSession by the session id.
Parameters:
  sessionId - the session's id an immutable UserSession, or null if no entry found



isLogged
public static boolean isLogged()(Code)
Verify is the user is logged in. true if the user is logged, or false if is an anonymous user.



isUserInSession
public static String isUserInSession(String username)(Code)
Verify if the user in already loaded
Parameters:
  username - The username to check The session id if the user is already registered into the session, or null if it is not.



isUserInSession
public static String isUserInSession(int userId)(Code)
Verify if there is an user in the session with the user id passed as parameter.
Parameters:
  userId - The user id to check for existance in the session The session id if the user is already registered into the session, or null if it is not.



makeLogged
public static void makeLogged()(Code)
Marks the current user session as "logged" in



makeUnlogged
public static void makeUnlogged()(Code)
Marks the current user session as "logged" out



registeredSize
public static int registeredSize()(Code)
Get the number of logged users the number of logged users



remove
public static void remove(String sessionId)(Code)
Remove an entry fro the session map
Parameters:
  sessionId - The session id to remove



removeAttribute
public static void removeAttribute(String name)(Code)
Removes an attribute from the session
Parameters:
  name - The key associated to the the attribute to remove



setAttribute
public static void setAttribute(String name, Object value)(Code)
Add a new entry to the user's session
Parameters:
  name - The attribute name
Parameters:
  value - The attribute value



setCacheEngine
public void setCacheEngine(CacheEngine engine)(Code)

See Also:   net.jforum.cache.Cacheable.setCacheEngine(net.jforum.cache.CacheEngine)



size
public static int size()(Code)
Gets the number of session elements. The number of session elements currently online (without bots)



storeSessionData
public static void storeSessionData(String sessionId)(Code)
Persists user session information. This method will get a Connection making a call to DBConnection.getImplementation().getConnection(), and then releasing the connection after the method is processed.
Parameters:
  sessionId - The session which we're going to persist information
See Also:   SessionFacade.storeSessionData(String,Connection)



storeSessionData
public static void storeSessionData(String sessionId, Connection conn)(Code)
Persists user session information.
Parameters:
  sessionId - The session which we're going to persist
Parameters:
  conn - A Connection to be used to connect tothe database.
See Also:   SessionFacade.storeSessionData(String)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.