Java Doc for SessionImpl.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » server » session » 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 » EJB Server resin 3.1.5 » resin » com.caucho.server.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.server.session.SessionImpl

SessionImpl
public class SessionImpl implements HttpSession,CacheListener(Code)
Implements a HTTP session.

Inner Class : enum Logout
Inner Class :static class LoginPrincipal implements java.io.Serializable

Field Summary
final static  L10NL
    
final static  StringLOGIN
    
 long_accessTime
    
 boolean_isClosing
    
 boolean_isInvalidating
    
 boolean_isValid
    
protected  SessionManager_manager
    
 long_maxInactiveInterval
    
protected  Map<String, Object>_values
    
final protected static  Loggerlog
    

Constructor Summary
public  SessionImpl(SessionManager manager, String id, long creationTime)
     Create a new session object.

Method Summary
 booleanaddUse()
     Set true if the session is in use.
public  booleancanLog()
    
 voidcreate(long now)
     Creates a new session.
protected  Map<String, Object>createValueMap()
     Create the map used to store values.
 voidendUse()
     Set true if the session is in use.
public  voidfinish()
     Cleaning up session stuff at the end of a request.

If the session data has changed and we have persistent sessions, save the session.

public  ObjectgetAttribute(String name)
     Returns the named attribute from the session.
public  EnumerationgetAttributeNames()
     Return an enumeration of all the sessions' attribute names.
public  ServletAuthenticatorgetAuthenticator()
    
public  longgetCreationTime()
     Returns the time the session was created.
 SetgetEntrySet()
    
public  StringgetId()
     Returns the session identifier.
public  longgetLastAccessedTime()
     Returns the last access time.
public  SessionManagergetManager()
     Returns the session manager.
public  intgetMaxInactiveInterval()
     Returns the time the session is allowed to be alive.
public  ServletContextgetServletContext()
     Returns the servlet context.
public  HttpSessionContextgetSessionContext()
     Returns the session context.
 intgetSrunIndex()
     Returns the index of the owning srun for distributed sessions.
public  PrincipalgetUser()
    
public  ObjectgetValue(String name)
    
public  String[]getValueNames()
    
public  booleaninUse()
     Returns true if the session is in use.
public  voidinvalidate()
     Invalidates the session, called by user code.
public  voidinvalidateLogout()
     Invalidates a session based on a logout.
 voidinvalidateLru()
    
 voidinvalidateTimeout()
    
 booleanisClosing()
    
public  booleanisEmpty()
     Returns true if the session is empty.
public  booleanisNew()
     Returns true if the session is new.
public  booleanisValid()
     Returns true if the session is valid.
public  booleanload()
     Loads the session.
public  voidload(Hessian2Input in)
     Loads the object from the input stream.
public  voidload(ObjectInput in)
     Loads the object from the input stream.
public  voidlog(String value)
    
public  voidlogout()
    
public  voidlogout(SessionImpl timeoutSession)
    
public  voidpassivate()
     Passivates the session.
public  voidputValue(String name, Object value)
    
public  voidremoveAttribute(String name)
     Remove a session attribute.
public  voidremoveEvent()
     Callback when the session is removed from the session cache, generally because the session cache is full.
public  voidremoveValue(String name)
    
 voidreset(long now)
     Clears the session when reading a bad saved session.
final public  voidsave()
     Saves changes to the session.
final public  voidsaveAfterRequest()
     Flush changes after a request completes.
final public  voidsaveBeforeFlush()
     Save changes before any flush.
final public  voidsaveBeforeHeaders()
     Flush changes before the headers.
 voidsaveOnShutdown()
     Store on shutdown.
 voidsetAccess(long now)
    
public  voidsetAttribute(String name, Object value)
     Sets a session attribute.
 voidsetClusterObject(ClusterObject clusterObject)
     Sets the cluster object.
public  voidsetMaxInactiveInterval(int value)
     Sets the maximum time a session is allowed to be alive.
public  voidsetUser(Principal user)
    
 voidsetValid(boolean isValid)
     Set the session valid or invalid.
public  voidstore(Hessian2Output out)
     Saves the object to the input stream.
public  voidstore(ObjectOutput out)
     Saves the object to the input stream.
public  StringtoString()
    
public  voidunbind()
     Cleans up the session.

Field Detail
L
final static L10N L(Code)



LOGIN
final static String LOGIN(Code)



_accessTime
long _accessTime(Code)



_isClosing
boolean _isClosing(Code)



_isInvalidating
boolean _isInvalidating(Code)



_isValid
boolean _isValid(Code)



_manager
protected SessionManager _manager(Code)



_maxInactiveInterval
long _maxInactiveInterval(Code)



_values
protected Map<String, Object> _values(Code)



log
final protected static Logger log(Code)




Constructor Detail
SessionImpl
public SessionImpl(SessionManager manager, String id, long creationTime)(Code)
Create a new session object.
Parameters:
  manager - the owning session manager.
Parameters:
  id - the session identifier.
Parameters:
  creationTime - the time in milliseconds when the session was created.




Method Detail
addUse
boolean addUse()(Code)
Set true if the session is in use.



canLog
public boolean canLog()(Code)



create
void create(long now)(Code)
Creates a new session.



createValueMap
protected Map<String, Object> createValueMap()(Code)
Create the map used to store values.



endUse
void endUse()(Code)
Set true if the session is in use.



finish
public void finish()(Code)
Cleaning up session stuff at the end of a request.

If the session data has changed and we have persistent sessions, save the session. However, if save-on-shutdown is true, only save on a server shutdown.




getAttribute
public Object getAttribute(String name)(Code)
Returns the named attribute from the session.



getAttributeNames
public Enumeration getAttributeNames()(Code)
Return an enumeration of all the sessions' attribute names. enumeration of the attribute names.



getAuthenticator
public ServletAuthenticator getAuthenticator()(Code)
Returns the authenticator



getCreationTime
public long getCreationTime()(Code)
Returns the time the session was created.



getEntrySet
Set getEntrySet()(Code)
Returns the set of values in the session



getId
public String getId()(Code)
Returns the session identifier.



getLastAccessedTime
public long getLastAccessedTime()(Code)
Returns the last access time.



getManager
public SessionManager getManager()(Code)
Returns the session manager.



getMaxInactiveInterval
public int getMaxInactiveInterval()(Code)
Returns the time the session is allowed to be alive. time allowed to live in seconds



getServletContext
public ServletContext getServletContext()(Code)
Returns the servlet context.



getSessionContext
public HttpSessionContext getSessionContext()(Code)
Returns the session context.



getSrunIndex
int getSrunIndex()(Code)
Returns the index of the owning srun for distributed sessions.



getUser
public Principal getUser()(Code)
Returns the user



getValue
public Object getValue(String name)(Code)



getValueNames
public String[] getValueNames()(Code)



inUse
public boolean inUse()(Code)
Returns true if the session is in use.



invalidate
public void invalidate()(Code)
Invalidates the session, called by user code. This should never be called by Resin code (for logging purposes)



invalidateLogout
public void invalidateLogout()(Code)
Invalidates a session based on a logout.



invalidateLru
void invalidateLru()(Code)
Invalidates a session based on a LRU



invalidateTimeout
void invalidateTimeout()(Code)
Invalidates a session based on a timeout



isClosing
boolean isClosing()(Code)



isEmpty
public boolean isEmpty()(Code)
Returns true if the session is empty.



isNew
public boolean isNew()(Code)
Returns true if the session is new.



isValid
public boolean isValid()(Code)
Returns true if the session is valid.



load
public boolean load()(Code)
Loads the session.



load
public void load(Hessian2Input in) throws IOException(Code)
Loads the object from the input stream.



load
public void load(ObjectInput in) throws IOException(Code)
Loads the object from the input stream.



log
public void log(String value)(Code)



logout
public void logout()(Code)
Logs out the user



logout
public void logout(SessionImpl timeoutSession)(Code)
Logs out the user
Parameters:
  session - the session in case of timeout and single-signon



passivate
public void passivate()(Code)
Passivates the session.



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



removeAttribute
public void removeAttribute(String name)(Code)
Remove a session attribute. If the value is a listener, notify it of the change.
Parameters:
  name - the name of the attribute to remove



removeEvent
public void removeEvent()(Code)
Callback when the session is removed from the session cache, generally because the session cache is full.



removeValue
public void removeValue(String name)(Code)



reset
void reset(long now)(Code)
Clears the session when reading a bad saved session.



save
final public void save()(Code)
Saves changes to the session.



saveAfterRequest
final public void saveAfterRequest()(Code)
Flush changes after a request completes.



saveBeforeFlush
final public void saveBeforeFlush()(Code)
Save changes before any flush.



saveBeforeHeaders
final public void saveBeforeHeaders()(Code)
Flush changes before the headers.



saveOnShutdown
void saveOnShutdown()(Code)
Store on shutdown.



setAccess
void setAccess(long now)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)
Sets a session attribute. If the value is a listener, notify it of the change. If the value has changed mark the session as changed for persistent sessions.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute



setClusterObject
void setClusterObject(ClusterObject clusterObject)(Code)
Sets the cluster object.



setMaxInactiveInterval
public void setMaxInactiveInterval(int value)(Code)
Sets the maximum time a session is allowed to be alive.
Parameters:
  value - time allowed to live in seconds



setUser
public void setUser(Principal user)(Code)
Sets the user



setValid
void setValid(boolean isValid)(Code)
Set the session valid or invalid.



store
public void store(Hessian2Output out) throws IOException(Code)
Saves the object to the input stream.



store
public void store(ObjectOutput out) throws IOException(Code)
Saves the object to the input stream.



toString
public String toString()(Code)



unbind
public void unbind()(Code)
Cleans up the session.



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.