Java Doc for BasicSession.java in  » J2EE » Enhydra-Application-Framework » com » lutris » appserver » server » sessionEnhydra » 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 » J2EE » Enhydra Application Framework » com.lutris.appserver.server.sessionEnhydra 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lutris.appserver.server.sessionEnhydra.BasicSession

All known Subclasses:   com.lutris.appserver.server.sessionEnhydra.PagedSession,
BasicSession
public class BasicSession implements StandardSession,HttpSession,Serializable(Code)
The standard implementation of the StandardSession interface. The session reflects and instance of a client interacting with the application. A BasicSession maybe associated with a user or exist in a unauthenticated state. The session manager associated with a BasicSession object must be a StandardSessionManager or a derivation.
version:
   $Revision: 1.3 $
author:
   John Marco
author:
   Shawn McMurdo


Field Summary
 Hashtableattributes
    
public  SessionDatadata
     The application specific data for this session.
protected transient  StandardSessionManagersessionManager
    
protected  Useruser
    
 booleanvalid
    

Constructor Summary
public  BasicSession()
    
protected  BasicSession(StandardSessionManager sessionManager, String sessionKey)
     Construct a new session.
protected  BasicSession(StandardSessionManager sessionManager, String sessionKey, SessionData sessionData)
     Construct a new session.

Method Summary
public  voidclearUser()
     Remove the user association with this session.
public  intdecrementRefCount()
     Returns the number of active references to this object.
public  ObjectgetAttribute(String name)
    
public  EnumerationgetAttributeNames()
    
public  longgetCreationTime()
    
public  HttpSessiongetHttpSession()
    
public  StringgetId()
    
public  longgetLastAccessedTime()
    
public  longgetMaxIdleTime()
     Obtain the maximum idle time for this object.
public  intgetMaxInactiveInterval()
    
public  longgetMaxNoUserIdleTime()
     Obtain the maximum idle time when a User object is not associated with the session.
public  intgetRefCount()
     Returns the number of active references to this object.
public  ServletContextgetServletContext()
    
public  HttpSessionContextgetSessionContext()
    
public  SessionDatagetSessionData()
     Obtain the application specific data for this session.
public  StringgetSessionKey()
     Obtain the unique key associated with this session.
public  SessionManagergetSessionManager()
     Obtain the session manager associated with this session.
public  longgetTimeCreated()
     Obtain the creation time for this object.
public  longgetTimeExpires()
     Obtain the time of expiry for this object.
public  longgetTimeLastUsed()
     Obtain the time of last use for this object.
public  UsergetUser()
     Obtain the user associated with this session.
public  ObjectgetValue(String name)
    
public  String[]getValueNames()
    
public  intincrementRefCount()
     Returns the number of active references to this object.
public  voidinvalidate()
    
public  booleanisNew()
     Returns true if the session is new.
public  voidputValue(String name, Object value)
    
public  voidremoveAttribute(String name)
    
public  voidremoveValue(String name)
    
public  voidsetAttribute(String name, Object value)
    
public  voidsetHttpSession(HttpSession httpSession)
    
public  voidsetMaxIdleTime(long maxIdleTime)
     Set the maximum idle time for this object.
public  voidsetMaxInactiveInterval(int interval)
    
public  voidsetMaxNoUserIdleTime(long maxIdleTime)
     set the maximum idle time when a User object is not associated with the session.
public  voidsetTimeExpires(long timeExpires)
     Set the time of expiry for this object.
public  voidsetUser(User sessionUser)
     Set the user associated with this session.
public  StringtoString()
     Prints a string representation of this object.
public  voidtouch()
     Set the "last used" timestamp to the current time, resetting the idle period.

Field Detail
attributes
Hashtable attributes(Code)



data
public SessionData data(Code)
The application specific data for this session.



sessionManager
protected transient StandardSessionManager sessionManager(Code)



user
protected User user(Code)



valid
boolean valid(Code)




Constructor Detail
BasicSession
public BasicSession()(Code)
Need the following constructor in order to serialize?



BasicSession
protected BasicSession(StandardSessionManager sessionManager, String sessionKey)(Code)
Construct a new session. Only called by StandardSessionManager.
Parameters:
  sessionManager - The session manager that will manager this session.
Parameters:
  sessionKey - The unique session key associated with the session.



BasicSession
protected BasicSession(StandardSessionManager sessionManager, String sessionKey, SessionData sessionData)(Code)
Construct a new session. Only called by StandardSessionManager.
Parameters:
  sessionManager - The session manager that will manager this session.
Parameters:
  sessionKey - The unique session key associated with the session.
Parameters:
  sessionData - The session data to associate with this session.




Method Detail
clearUser
public void clearUser() throws SessionException(Code)
Remove the user association with this session. This will unregister the user with the SessionManager.
exception:
  SessionException - if an error occurs.



decrementRefCount
public int decrementRefCount()(Code)
Returns the number of active references to this object. the number of references.



getAttribute
public Object getAttribute(String name)(Code)



getAttributeNames
public Enumeration getAttributeNames()(Code)



getCreationTime
public long getCreationTime()(Code)



getHttpSession
public HttpSession getHttpSession()(Code)



getId
public String getId()(Code)



getLastAccessedTime
public long getLastAccessedTime()(Code)



getMaxIdleTime
public long getMaxIdleTime()(Code)
Obtain the maximum idle time for this object. Zero (or negative) indicates that sessions may be idle indefinetly. The maximum number of milliseconds this sessionmay be idle.



getMaxInactiveInterval
public int getMaxInactiveInterval()(Code)



getMaxNoUserIdleTime
public long getMaxNoUserIdleTime()(Code)
Obtain the maximum idle time when a User object is not associated with the session. Zero (or negative) indicates that sessions may be idle indefinetly. The maximum number of milliseconds this sessionmay be idle.



getRefCount
public int getRefCount()(Code)
Returns the number of active references to this object. the number of references.



getServletContext
public ServletContext getServletContext()(Code)



getSessionContext
public HttpSessionContext getSessionContext()(Code)



getSessionData
public SessionData getSessionData()(Code)
Obtain the application specific data for this session. A SessionData object containing application specificdata for this session.



getSessionKey
public String getSessionKey()(Code)
Obtain the unique key associated with this session. A String containing the key for this session.



getSessionManager
public SessionManager getSessionManager()(Code)
Obtain the session manager associated with this session. The session manager object.



getTimeCreated
public long getTimeCreated()(Code)
Obtain the creation time for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch). The creation time since epoch for this object.



getTimeExpires
public long getTimeExpires()(Code)
Obtain the time of expiry for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch). Returns zero (or negative) if there is no expiration date. Note: this is a maximum lifespan for the session, regardless of activity. The time of expiry since epoch for this object.



getTimeLastUsed
public long getTimeLastUsed()(Code)
Obtain the time of last use for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch). The time of last use since epoch for this object.



getUser
public User getUser()(Code)
Obtain the user associated with this session. The user object or null if thesession is not logged in.



getValue
public Object getValue(String name)(Code)



getValueNames
public String[] getValueNames()(Code)



incrementRefCount
public int incrementRefCount()(Code)
Returns the number of active references to this object. the number of references.



invalidate
public void invalidate()(Code)



isNew
public boolean isNew()(Code)
Returns true if the session is new. A session is new if it has been created but a client cookie was never used to reference it. In other words, the cookie associated with the session was never submitted by a client. true if the session is new.



putValue
public void putValue(String name, Object value)(Code)



removeAttribute
public void removeAttribute(String name)(Code)



removeValue
public void removeValue(String name)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)



setHttpSession
public void setHttpSession(HttpSession httpSession)(Code)



setMaxIdleTime
public void setMaxIdleTime(long maxIdleTime)(Code)
Set the maximum idle time for this object. Set this to zero (or negative) to disable idle checking.
Parameters:
  maxIdleTime - The maximum number of milliseconds thissession may be idle, or zero (or negative) to allow sessions to be idleindefinetly.



setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)(Code)



setMaxNoUserIdleTime
public void setMaxNoUserIdleTime(long maxIdleTime)(Code)
set the maximum idle time when a User object is not associated with the session. Set this to zero (or negative) to disable idle checking.
Parameters:
  maxIdleTime - The maximum number of milliseconds thissession may be idle.



setTimeExpires
public void setTimeExpires(long timeExpires)(Code)
Set the time of expiry for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch). Set this value to zero (or less) to indicate that the session does not have a maximum age.
Parameters:
  timeLastUsed - The time of expiry since epoch.



setUser
public void setUser(User sessionUser) throws SessionException(Code)
Set the user associated with this session. This will register the user with the SessionManager.

If it is neccessary to prevent a user from logging on multiple times, this can be accomplished by synchronizing on the Sessionmanager object and enquiring about the number of users associated with a session. It is then possible to delete other sessions before adding a new session.
Parameters:
  user - the user object to associate with the session.
exception:
  SessionException - if the user cannot be associated with the session.




toString
public String toString()(Code)
Prints a string representation of this object. the string representation.



touch
public void touch()(Code)
Set the "last used" timestamp to the current time, resetting the idle period.



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.