Java Doc for Session.java in  » Swing-Library » wings3 » org » wings » 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 » Swing Library » wings3 » org.wings.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.wings.session.Session

All known Subclasses:   org.wings.jsp.WingsSession,  org.wings.session.ExtendedSession,
Session
public class Session implements PropertyService,Serializable(Code)
This class represents a wingS session meaning an application user session instance. Please do not mix this with a servlet javax.servlet.http.HttpSession !

A wings Session is a session instance hold by the global WingServlet servlet. It aggregates all per--user-session data (mainly the root SFrame s and provides some information about the client like the browser Session.getUserAgent() , the current character encoding Session.getCharacterEncoding() or the used Locale Session.getLocale() .
author:
   Holger Engels



Field Summary
final public static  StringCHARACTER_ENCODING_PROPERTY
    
final public static  StringLOCALE_PROPERTY
    
final public static  StringLOOK_AND_FEEL_PROPERTY
    
final static  SRequestListenerSESSION_STATISTIC_COLLECTOR
    
static  booleancollectStatistics
    
final protected  EventListenerListlistenerList
     Store here only weak references.
protected transient  HttpServletRequestservletRequest
    
protected transient  HttpServletResponseservletResponse
    

Constructor Summary
public  Session()
    

Method Summary
public  voidaddExitListener(SExitListener listener)
    
public  voidaddFrame(SFrame frame)
     Describe addFrame method here.
public  voidaddPropertyChangeListener(PropertyChangeListener listener)
    
public  voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener)
     Describe addPropertyChangeListener method here.
public  voidaddRequestListener(SRequestListener listener)
    
public  booleancontainsProperty(String key)
    
public  StringcreateUniqueId()
     Creates a session context unique ID, that can be used as an identifier, i.e.
protected  voiddestroy()
    
 voiddetermineLocale()
    
public  voidexit(String redirectAddress)
     Exit the current session and redirect to other URL.

This removes the session and its associated application from memory.

public  voidexit()
     Exit the current session and redirect to new application instance.

This removes the session and its associated application from memory.

protected  voidfinalize()
    
final  voidfirePrepareExit()
     Fire an RequestEvent at each registered listener.
final  voidfirePrepareExit(boolean ignoreVeto)
    
 voidfireRequestEvent(int type)
     Fire an RequestEvent at each registered listener.
 voidfireRequestEvent(int type, ExternalizedResource resource)
     Fire an RequestEvent at each registered listener.
public  CGManagergetCGManager()
     The CG manager is responsible to provide the renderer implementation (aka.
public  StringgetCharacterEncoding()
     The current character encoding used for the communication with the clients userAgent.
public  SComponentgetComponentByName(String name)
    
public  SComponentgetComponentByName(SContainer container, String name)
     Search in the given SContainer for the SComponent with the given name.
public  LowLevelEventDispatchergetDispatcher()
     The low level event dispatcher is responsible for taking an HTTP request, parse it contents and delegate the so called low level events to the registered org.wings.LowLevelEventListener s (i.e.
public  DragAndDropManagergetDragAndDropManager()
    
public  StringgetExitAddress()
    
public  SExitListener[]getExitListeners()
    
public  ExternalizeManagergetExternalizeManager()
     The Externalize manager is response to provide all org.wings.Resource via HTTP to the client.
public  Set<SFrame>getFrames()
     Describe frames method here.
public  LocalegetLocale()
     The Locale of the current session.
final public  booleangetLocaleFromHeader()
     Indicates if the wings session servlet should adopt the clients Locale provided by the browsers in the HTTP header.
final public  intgetMaxContentLength()
     Get the maximum content length (file size) for a post request.
public  MenuManagergetMenuManager()
    
final public  MapgetProperties()
     Describe getProperties method here.
public  ObjectgetProperty(String key)
     Gets the session property indicated by the specified key.
Parameters:
  key - the name of the session property.
public  ObjectgetProperty(String key, Object def)
     Gets the session property indicated by the specified key.
Parameters:
  key - the name of the session property.
Parameters:
  def - a default value.
public  StringgetRedirectAddress()
    
public  ReloadManagergetReloadManager()
     The reload manager responsible for the component invalidation of the components contained in this wingS session.
public  ResourceMappergetResourceMapper()
    
public  SFramegetRootFrame()
     The root frame is the first shown frame.
public  ScriptManagergetScriptManager()
    
public  ServletContextgetServletContext()
     The current servlet context provided by the underlying servlet container.
public  HttpServletRequestgetServletRequest()
    
public  HttpServletResponsegetServletResponse()
     The current HTTP servlet response which the framework will deliver after processing the current request.
final public  SessionStatisticsgetStatistics()
    
final public  Locale[]getSupportedLocales()
     Returns the locales, supported by this application.
public  SToolTipManagergetToolTipManager()
    
public  BrowsergetUserAgent()
     Returns the current browser of the client detected by the User-Agent parameter of the initial HTTP request for this user session.
public  booleanhasDragAndDropManager()
    
public  voidinit(ServletConfig servletConfig, HttpServletRequest request, HttpServletResponse response)
     Detect user agent (userAgent).
public  voidinit(HttpServletRequest request)
     Detect user agent (userAgent).
protected  voidinitMaxContentLength()
    
protected  voidinitProps(ServletConfig servletConfig)
     Copy the init parameters.
protected  voidinitProps(ServletContext servletContext)
    
public  voidremoveExitListener(SExitListener listener)
    
public  voidremoveFrame(SFrame frame)
     Describe removeFrame method here.
public  ObjectremoveProperty(String key)
    
public  voidremovePropertyChangeListener(PropertyChangeListener listener)
    
public  voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener)
     Describe removePropertyChangeListener method here.
public  voidremoveRequestListener(SRequestListener listener)
    
public  voidsetCharacterEncoding(String characterEncoding)
     The current character encoding used for the communication with the clients userAgent. If null then the current characterEncoding is determined by the current session Locale via the charset.properties map.
Parameters:
  characterEncoding - The charcterEncoding which should be enforces for this session (i.e.
public  voidsetDndManager(DragAndDropManager dndManager)
    
public  voidsetLocale(Locale locale)
     Sets the locale for this session.
final public  voidsetLocaleFromHeader(boolean adoptLocale)
     Indicates if the wings session servlet should adopt the clients Locale provided by the browsers in the HTTP header.
final public  voidsetMaxContentLength(int l)
     Set the maximum content length (file size) for a post request.
public  ObjectsetProperty(String key, Object value)
     Sets the session property indicated by the specified key.
Parameters:
  key - the name of the session property.
Parameters:
  value - the value of the session property.
public  voidsetRedirectAddress(String redirectAddress)
    
public  voidsetReloadManager(ReloadManager reloadManager)
     Override the current reload manager.
public  voidsetResourceMapper(ResourceMapper resourceMapper)
    
 voidsetServletRequest(HttpServletRequest servletRequest)
    
 voidsetServletResponse(HttpServletResponse servletResponse)
     Sets the current servlet response in progress.
final public  voidsetSupportedLocales(Locale[] locales)
     sets the locales, supported by this application.
public  voidsetUserAgentFromRequest(HttpServletRequest request)
     Describe setUserAgentFromRequest method here.

Field Detail
CHARACTER_ENCODING_PROPERTY
final public static String CHARACTER_ENCODING_PROPERTY(Code)
The property name of the sessions character encoding



LOCALE_PROPERTY
final public static String LOCALE_PROPERTY(Code)
The property name of the locale



LOOK_AND_FEEL_PROPERTY
final public static String LOOK_AND_FEEL_PROPERTY(Code)
The property name of the look&feel



SESSION_STATISTIC_COLLECTOR
final static SRequestListener SESSION_STATISTIC_COLLECTOR(Code)



collectStatistics
static boolean collectStatistics(Code)



listenerList
final protected EventListenerList listenerList(Code)
Store here only weak references.



servletRequest
protected transient HttpServletRequest servletRequest(Code)



servletResponse
protected transient HttpServletResponse servletResponse(Code)




Constructor Detail
Session
public Session()(Code)




Method Detail
addExitListener
public void addExitListener(SExitListener listener)(Code)



addFrame
public void addFrame(SFrame frame)(Code)
Describe addFrame method here.
Parameters:
  frame - a SFrame value



addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)(Code)



addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)
Describe addPropertyChangeListener method here.
Parameters:
  propertyName - a String value
Parameters:
  listener - a PropertyChangeListener value



addRequestListener
public void addRequestListener(SRequestListener listener)(Code)



containsProperty
public boolean containsProperty(String key)(Code)



createUniqueId
public String createUniqueId()(Code)
Creates a session context unique ID, that can be used as an identifier, i.e. it is guaranteed to start with a letter a String value



destroy
protected void destroy()(Code)



determineLocale
void determineLocale()(Code)



exit
public void exit(String redirectAddress)(Code)
Exit the current session and redirect to other URL.

This removes the session and its associated application from memory. The userAgent is redirected to the given URL. Note, that it is not even possible for the user to re-enter the application with the BACK-button, since all information is removed.

Always exit an application by calling an exit() method, especially, if it is an application that requires a login and thus handles sensitive information accessible through the session. Usually, you will call this on behalf of an event within an ActionListener.actionPerformed() like for a pressed 'EXIT'-Button.
Parameters:
  redirectAddress - the address, the userAgent is redirected afterremoving this session. This must be a Stringcontaining the complete URL (no relative URL)to the place to be redirected. If 'null', nothinghappens.




exit
public void exit()(Code)
Exit the current session and redirect to new application instance.

This removes the session and its associated application from memory. The userAgent is redirected to the same application with a fresh session. Note, that it is not even possible for the user to re-enter the old application with the BACK-button, since all information is removed.

Always exit an application by calling an exit() method, especially, if it is an application that requires an login and thus handles sensitive information accessible through the session. Usually, you will call this on behalf of an event within an ActionListener.actionPerformed() like for a pressed 'EXIT'-Button.




finalize
protected void finalize()(Code)



firePrepareExit
final void firePrepareExit() throws ExitVetoException(Code)
Fire an RequestEvent at each registered listener.



firePrepareExit
final void firePrepareExit(boolean ignoreVeto) throws ExitVetoException(Code)



fireRequestEvent
void fireRequestEvent(int type)(Code)
Fire an RequestEvent at each registered listener.



fireRequestEvent
void fireRequestEvent(int type, ExternalizedResource resource)(Code)
Fire an RequestEvent at each registered listener.



getCGManager
public CGManager getCGManager()(Code)
The CG manager is responsible to provide the renderer implementation (aka. PLAF) for a given component class. The current CG manager



getCharacterEncoding
public String getCharacterEncoding()(Code)
The current character encoding used for the communication with the clients userAgent. If null then the current characterEncoding is determined by the current session Locale via the charset.properties map. The characterEncoding set for this sesson or determined by the current Locale.



getComponentByName
public SComponent getComponentByName(String name)(Code)



getComponentByName
public SComponent getComponentByName(SContainer container, String name)(Code)
Search in the given SContainer for the SComponent with the given name.
Parameters:
  container - The SContainer where you want to search for the SComponent with the given name.
Parameters:
  name - The Name of the SComponent the SComponent with the given name



getDispatcher
public LowLevelEventDispatcher getDispatcher()(Code)
The low level event dispatcher is responsible for taking an HTTP request, parse it contents and delegate the so called low level events to the registered org.wings.LowLevelEventListener s (i.e. Buttons, etc.) The low level event dispatcher responsible for this session.



getDragAndDropManager
public DragAndDropManager getDragAndDropManager()(Code)



getExitAddress
public String getExitAddress()(Code)



getExitListeners
public SExitListener[] getExitListeners()(Code)



getExternalizeManager
public ExternalizeManager getExternalizeManager()(Code)
The Externalize manager is response to provide all org.wings.Resource via HTTP to the client. The externalize manager responsible to externalize all sortof resources contained in this session.



getFrames
public Set<SFrame> getFrames()(Code)
Describe frames method here. a Set value



getLocale
public Locale getLocale()(Code)
The Locale of the current session. This Locale reflects the Locale of the clients userAgent. a Locale value



getLocaleFromHeader
final public boolean getLocaleFromHeader()(Code)
Indicates if the wings session servlet should adopt the clients Locale provided by the browsers in the HTTP header.



getMaxContentLength
final public int getMaxContentLength()(Code)
Get the maximum content length (file size) for a post request. maximum size in kB (1024 Byte)
See Also:   org.wings.session.MultipartRequest



getMenuManager
public MenuManager getMenuManager()(Code)



getProperties
final public Map getProperties()(Code)
Describe getProperties method here. a Map value



getProperty
public Object getProperty(String key)(Code)
Gets the session property indicated by the specified key.
Parameters:
  key - the name of the session property. the string value of the session property,or null if there is no property with that key.



getProperty
public Object getProperty(String key, Object def)(Code)
Gets the session property indicated by the specified key.
Parameters:
  key - the name of the session property.
Parameters:
  def - a default value. the string value of the session property,or the default value if there is no property with that key.
See Also:   org.wings.session.PropertyService.getProperties



getRedirectAddress
public String getRedirectAddress()(Code)



getReloadManager
public ReloadManager getReloadManager()(Code)
The reload manager responsible for the component invalidation of the components contained in this wingS session. (Epoch counter) Lazily constructs DefaultReloadManager if no other reloadmanager has been set



getResourceMapper
public ResourceMapper getResourceMapper()(Code)



getRootFrame
public SFrame getRootFrame()(Code)
The root frame is the first shown frame. a SFrame value



getScriptManager
public ScriptManager getScriptManager()(Code)
The Script manager collects scripts The script manager responsible to script all sortof resources contained in this session.



getServletContext
public ServletContext getServletContext()(Code)
The current servlet context provided by the underlying servlet container. This value is retrieved from the initial servlet request for this session. The current servlet context provided by the underlyingservlet container.



getServletRequest
public HttpServletRequest getServletRequest()(Code)



getServletResponse
public HttpServletResponse getServletResponse()(Code)
The current HTTP servlet response which the framework will deliver after processing the current request. This is a part of the Servlet architecture. The current servlet response about to send to the client



getStatistics
final public SessionStatistics getStatistics()(Code)



getSupportedLocales
final public Locale[] getSupportedLocales()(Code)
Returns the locales, supported by this application. If empty or null, all locales are supported.



getToolTipManager
public SToolTipManager getToolTipManager()(Code)
The tooltip manager object containing configuration values on the componentstooltip behaviour



getUserAgent
public Browser getUserAgent()(Code)
Returns the current browser of the client detected by the User-Agent parameter of the initial HTTP request for this user session. A Browser object providing browser type, os type andother informations from the HTTP User-Agent string.



hasDragAndDropManager
public boolean hasDragAndDropManager()(Code)



init
public void init(ServletConfig servletConfig, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)
Detect user agent (userAgent). Copy init parameters. Set max content length for uploads / requests. Install look and feel.
Parameters:
  servletConfig - a ServletConfig value
Parameters:
  request - a HttpServletRequest value
Parameters:
  response -
throws:
  ServletException - if an error occurs



init
public void init(HttpServletRequest request) throws ServletException(Code)
Detect user agent (userAgent). Copy init parameters. Set max content length for uploads / requests. Install look and feel.
Parameters:
  request - a HttpServletRequest value
throws:
  ServletException - if an error occurs



initMaxContentLength
protected void initMaxContentLength()(Code)



initProps
protected void initProps(ServletConfig servletConfig)(Code)
Copy the init parameters.



initProps
protected void initProps(ServletContext servletContext)(Code)



removeExitListener
public void removeExitListener(SExitListener listener)(Code)



removeFrame
public void removeFrame(SFrame frame)(Code)
Describe removeFrame method here.
Parameters:
  frame - a SFrame value



removeProperty
public Object removeProperty(String key)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)
Describe removePropertyChangeListener method here.
Parameters:
  propertyName - a String value
Parameters:
  listener - a PropertyChangeListener value



removeRequestListener
public void removeRequestListener(SRequestListener listener)(Code)



setCharacterEncoding
public void setCharacterEncoding(String characterEncoding)(Code)
The current character encoding used for the communication with the clients userAgent. If null then the current characterEncoding is determined by the current session Locale via the charset.properties map.
Parameters:
  characterEncoding - The charcterEncoding which should be enforces for this session (i.e. "utf-8"),or null if it should be determined by the clients userAgent Locale.



setDndManager
public void setDndManager(DragAndDropManager dndManager)(Code)



setLocale
public void setLocale(Locale locale) throws IllegalArgumentException(Code)
Sets the locale for this session. A property change event is fired, if the locale has actually changed.
Parameters:
  locale - the locale to be associated with this session.



setLocaleFromHeader
final public void setLocaleFromHeader(boolean adoptLocale)(Code)
Indicates if the wings session servlet should adopt the clients Locale provided by the browsers in the HTTP header.
Parameters:
  adoptLocale - if true, try to determine, false ignore



setMaxContentLength
final public void setMaxContentLength(int l)(Code)
Set the maximum content length (file size) for a post request.
Parameters:
  l - size in kB (1024 Byte)
See Also:   org.wings.session.MultipartRequest



setProperty
public Object setProperty(String key, Object value)(Code)
Sets the session property indicated by the specified key.
Parameters:
  key - the name of the session property.
Parameters:
  value - the value of the session property. the previous value of the session property,or null if it did not have one.
See Also:   org.wings.session.PropertyService.getProperty(java.lang.String)
See Also:   org.wings.session.PropertyService.getProperty(java.lang.Stringjava.lang.Object)



setRedirectAddress
public void setRedirectAddress(String redirectAddress)(Code)



setReloadManager
public void setReloadManager(ReloadManager reloadManager)(Code)
Override the current reload manager.
Parameters:
  reloadManager - You customized reload manager implementation.



setResourceMapper
public void setResourceMapper(ResourceMapper resourceMapper)(Code)



setServletRequest
void setServletRequest(HttpServletRequest servletRequest)(Code)



setServletResponse
void setServletResponse(HttpServletResponse servletResponse)(Code)
Sets the current servlet response in progress. Used by wingS framework



setSupportedLocales
final public void setSupportedLocales(Locale[] locales)(Code)
sets the locales, supported by this application. If empty or null, all locales are supported.



setUserAgentFromRequest
public void setUserAgentFromRequest(HttpServletRequest request)(Code)
Describe setUserAgentFromRequest method here.
Parameters:
  request - a HttpServletRequest value



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.