Source Code Cross Referenced for WebAppServletContext.java in  » Net » Terracotta » weblogic » servlet » internal » 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 » Net » Terracotta » weblogic.servlet.internal 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package weblogic.servlet.internal;
002:
003:        import java.util.List;
004:
005:        import javax.servlet.http.HttpSessionAttributeListener;
006:        import javax.servlet.http.HttpSessionListener;
007:
008:        import weblogic.servlet.internal.session.SessionContext;
009:
010:        /**
011:         * This is a dummy class representing a real Weblogic class. It actually is being
012:         * used as a dummy for both the Weblogic 8 AND 9 versions, which have different
013:         * methods and fields.  
014:         * 
015:         * This class also has a bunch of methods that will be generated by ASM into the 
016:         * actual WL 8/9 class.  All of these methods start with "__tc_".  These methods 
017:         * are here so we can use the bytecode plugin to generate and maintain the 
018:         * necessary ASM code in WebAppServletContextAdapter.
019:         */
020:        public class WebAppServletContext {
021:            // type stub only
022:
023:            // === Dummy methods simulating real methods ===
024:
025:            // Weblogic 8 only
026:            private List sessAttrListeners;
027:            private List sessListeners;
028:            private String sessionCookieComment;
029:            private String sessionCookieDomain;
030:            private int sessionCookieMaxAgeSecs;
031:            private String sessionCookieName;
032:            private String sessionCookiePath;
033:            private boolean sessionCookieSecure;
034:            private boolean sessionCookiesEnabled;
035:            private int sessionIDLength;
036:            private int sessionTimeoutSecs;
037:            private boolean sessionTrackingEnabled;
038:            private boolean sessionURLRewritingEnabled;
039:
040:            // Weblogic 8 and 9
041:            private HttpServer httpServer;
042:
043:            // Weblogic 9 only
044:            private SessionContext sessionContext;
045:
046:            public String getName() {
047:                throw new AssertionError();
048:            }
049:
050:            public String getContextPath() {
051:                throw new AssertionError();
052:            }
053:
054:            public HttpServer getServer() {
055:                throw new AssertionError();
056:            }
057:
058:            public EventsManager getEventsManager() {
059:                throw new AssertionError();
060:            }
061:
062:            // === Methods simulating those added by ASM ==== 
063:
064:            public boolean __tc_isWeblogic8() {
065:                try {
066:                    this .getClass().getDeclaredField("sessionCookieName");
067:                    return true;
068:                } catch (Exception e) {
069:                }
070:                return false;
071:            }
072:
073:            public HttpSessionAttributeListener[] __tc_session_getHttpSessionAttributeListeners() {
074:                if (__tc_isWeblogic8()) {
075:                    if (sessAttrListeners == null) {
076:                        return new HttpSessionAttributeListener[0];
077:                    } else {
078:                        return (HttpSessionAttributeListener[]) sessAttrListeners
079:                                .toArray(new HttpSessionAttributeListener[0]);
080:                    }
081:                } else {
082:                    return getEventsManager()
083:                            .__tc_session_getHttpSessionAttributeListeners();
084:                }
085:            }
086:
087:            public HttpSessionListener[] __tc_session_getHttpSessionListener() {
088:                if (__tc_isWeblogic8()) {
089:                    if (sessListeners == null) {
090:                        return new HttpSessionListener[0];
091:                    } else {
092:                        return (HttpSessionListener[]) sessListeners
093:                                .toArray(new HttpSessionListener[0]);
094:                    }
095:                } else {
096:                    return getEventsManager()
097:                            .__tc_session_getHttpSessionListener();
098:                }
099:            }
100:
101:            public String __tc_session_getCookieComment() {
102:                if (__tc_isWeblogic8()) {
103:                    return sessionCookieComment;
104:                } else {
105:                    return sessionContext.getConfigMgr().getCookieComment();
106:                }
107:            }
108:
109:            public String __tc_session_getCookieDomain() {
110:                if (__tc_isWeblogic8()) {
111:                    return sessionCookieDomain;
112:                } else {
113:                    return sessionContext.getConfigMgr().getCookieDomain();
114:                }
115:            }
116:
117:            public int __tc_session_getCookieMaxAgeSecs() {
118:                if (__tc_isWeblogic8()) {
119:                    return sessionCookieMaxAgeSecs;
120:                } else {
121:                    return sessionContext.getConfigMgr().getCookieMaxAgeSecs();
122:                }
123:            }
124:
125:            public String __tc_session_getCookieName() {
126:                if (__tc_isWeblogic8()) {
127:                    return sessionCookieName;
128:                } else {
129:                    return sessionContext.getConfigMgr().getCookieName();
130:                }
131:            }
132:
133:            public String __tc_session_getCookiePath() {
134:                if (__tc_isWeblogic8()) {
135:                    return sessionCookiePath;
136:                } else {
137:                    return sessionContext.getConfigMgr().getCookiePath();
138:                }
139:            }
140:
141:            public boolean __tc_session_getCookieSecure() {
142:                if (__tc_isWeblogic8()) {
143:                    return sessionCookieSecure;
144:                } else {
145:                    return sessionContext.getConfigMgr().isCookieSecure();
146:                }
147:            }
148:
149:            public boolean __tc_session_getCookiesEnabled() {
150:                if (__tc_isWeblogic8()) {
151:                    return sessionCookiesEnabled;
152:                } else {
153:                    return sessionContext.getConfigMgr()
154:                            .isSessionCookiesEnabled();
155:                }
156:            }
157:
158:            public int __tc_session_getIdLength() {
159:                if (__tc_isWeblogic8()) {
160:                    return sessionIDLength;
161:                } else {
162:                    return sessionContext.getConfigMgr().getIDLength();
163:                }
164:            }
165:
166:            // same for both weblogic 8 and 9
167:            public String __tc_session_getServerId() {
168:                return httpServer.getServerHash();
169:            }
170:
171:            // same for both wl 8 and 9
172:            public String __tc_session_getSessionDelimiter() {
173:                return "!";
174:            }
175:
176:            public int __tc_session_getSessionTimeoutSecs() {
177:                if (__tc_isWeblogic8()) {
178:                    return sessionTimeoutSecs;
179:                } else {
180:                    return sessionContext.getConfigMgr()
181:                            .getSessionTimeoutSecs();
182:                }
183:            }
184:
185:            public boolean __tc_session_getTrackingEnabled() {
186:                if (__tc_isWeblogic8()) {
187:                    return sessionTrackingEnabled;
188:                } else {
189:                    return sessionContext.getConfigMgr()
190:                            .isSessionTrackingEnabled();
191:                }
192:            }
193:
194:            public boolean __tc_session_getURLRewritingEnabled() {
195:                if (__tc_isWeblogic8()) {
196:                    return sessionURLRewritingEnabled;
197:                } else {
198:                    return sessionContext.getConfigMgr()
199:                            .isUrlRewritingEnabled();
200:                }
201:            }
202:
203:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.