Java Doc for HSession.java in  » Web-Server » Quadcap-Web-Server » com » quadcap » http » server22 » 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 » Web Server » Quadcap Web Server » com.quadcap.http.server22 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.quadcap.http.server22.HSession

HSession
public class HSession implements HttpSession(Code)
This class implements the javax.servlet.http.HttpSession interface.
author:
   Stan Bailes


Field Summary
 WebApplicationapp
    
 HashtableappData
    
 longcreationTime
    
 longlastAccessTime
    
 intmaxInactiveInterval
    
 booleannewSession
    
 StringsessionId
    
 booleanvalid
    

Constructor Summary
public  HSession(WebApplication app, String sessionId, int maxInactiveInterval)
     Construct a new session object.

Method Summary
public  ObjectgetAttribute(String name)
     Returns the object bound to the given name in the session's application layer data.
public  EnumerationgetAttributeNames()
     Return an enumeration of the names of objects in the session's application layer data.
public  longgetCreationTime()
     Returns the time at which this session representation was created, in milliseconds since midnight, January 1, 1970 UTC.
public  StringgetId()
     Returns the identifier assigned to this session.
public  longgetLastAccessedTime()
     Returns the last time the client sent a request carrying the identifier assigned to the session.
public  intgetMaxInactiveInterval()
    
public  HttpSessionContextgetSessionContext()
     Returns the context in which this session is bound.
public  ObjectgetValue(String name)
    
public  String[]getValueNames()
     Returns an array of the names of all the application layer data objects bound into the session.
public  voidinvalidate()
     Causes this representation of the session to be invalidated and removed from its context.
public  booleanisNew()
     A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session. For example, if the server supported only cookie-based sessions and the client had completely disabled the use of cookies, then calls to HttpServletRequest.getSession() would always return "new" sessions.
 booleanisValid()
    
public  voidputValue(String name, Object value)
    
public  voidremoveAttribute(String name)
     Removes the object bound to the given name in the session's application layer data.
public  voidremoveValue(String name)
    
public  voidsetAttribute(String name, Object value)
     Binds the specified object into the session's application layer data with the given name.
public  voidsetMaxInactiveInterval(int ivl)
    
 voidsetNotNew()
    
 voidupdateLastAccess()
    

Field Detail
app
WebApplication app(Code)



appData
Hashtable appData(Code)



creationTime
long creationTime(Code)



lastAccessTime
long lastAccessTime(Code)



maxInactiveInterval
int maxInactiveInterval(Code)



newSession
boolean newSession(Code)



sessionId
String sessionId(Code)



valid
boolean valid(Code)




Constructor Detail
HSession
public HSession(WebApplication app, String sessionId, int maxInactiveInterval)(Code)
Construct a new session object.
Parameters:
  app - the server context (session context) owning this session.
Parameters:
  sessionId - this session's id.




Method Detail
getAttribute
public Object getAttribute(String name)(Code)
Returns the object bound to the given name in the session's application layer data. Returns null if there is no such binding.
Parameters:
  name - the name of the binding to find the value bound to that name, or null if the binding doesnot exist.
exception:
  IllegalStateException - if an attempt is made to access HttpSession's session data after it has been invalidated



getAttributeNames
public Enumeration getAttributeNames()(Code)
Return an enumeration of the names of objects in the session's application layer data. an enumeration of names



getCreationTime
public long getCreationTime()(Code)
Returns the time at which this session representation was created, in milliseconds since midnight, January 1, 1970 UTC. the time when the session was created
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



getId
public String getId()(Code)
Returns the identifier assigned to this session. An HttpSession's identifier is a unique string that is created and maintained by HttpSessionContext. the identifier assigned to this session
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



getLastAccessedTime
public long getLastAccessedTime()(Code)
Returns the last time the client sent a request carrying the identifier assigned to the session. Time is expressed as milliseconds since midnight, January 1, 1970 UTC. Application level operations, such as getting or setting a value associated with the session, does not affect the access time.

This information is particularly useful in session management policies. For example,

  • a session manager could leave all sessions which have not been used in a long time in a given context.
  • the sessions can be sorted according to age to optimize some task.
the last time the client sent a request carrying the identifier assigned to the session
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



getMaxInactiveInterval
public int getMaxInactiveInterval()(Code)



getSessionContext
public HttpSessionContext getSessionContext()(Code)
Returns the context in which this session is bound. the name of the context in which this session is bound
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



getValue
public Object getValue(String name)(Code)



getValueNames
public String[] getValueNames()(Code)
Returns an array of the names of all the application layer data objects bound into the session. For example, if you want to delete all of the data objects bound into the session, use this method to obtain their names. an array containing the names of all of the application layer data objects bound into the session
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



invalidate
public void invalidate()(Code)
Causes this representation of the session to be invalidated and removed from its context.
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



isNew
public boolean isNew()(Code)
A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session. For example, if the server supported only cookie-based sessions and the client had completely disabled the use of cookies, then calls to HttpServletRequest.getSession() would always return "new" sessions. true if the session has been created by the server but the client has not yet acknowledged joining the session; false otherwise
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



isValid
boolean isValid()(Code)
---- Package-private implementation -----



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



removeAttribute
public void removeAttribute(String name)(Code)
Removes the object bound to the given name in the session's application layer data. Does nothing if there is no object bound to the given name. The value that implements the HttpSessionBindingListener interface will call its valueUnbound() method.
Parameters:
  name - the name of the object to remove
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated



removeValue
public void removeValue(String name)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)
Binds the specified object into the session's application layer data with the given name. Any existing binding with the same name is replaced. New (or existing) values that implement the HttpSessionBindingListener interface will call its valueBound() method.
Parameters:
  name - the name to which the data object will be bound. Thisparameter cannot be null.
Parameters:
  value - the data object to be bound.This parameter cannot be null.
exception:
  IllegalStateException - if an attempt is made to access session data after the session has been invalidated.



setMaxInactiveInterval
public void setMaxInactiveInterval(int ivl)(Code)



setNotNew
void setNotNew()(Code)



updateLastAccess
void updateLastAccess()(Code)



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.