01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.terracotta.session.util;
06:
07: import com.terracotta.session.WebAppConfig;
08:
09: import javax.servlet.http.HttpSessionAttributeListener;
10: import javax.servlet.http.HttpSessionListener;
11:
12: public class DefaultWebAppConfig implements WebAppConfig {
13:
14: private final int sessTimeoutSeconds;
15: private final HttpSessionAttributeListener[] attrList;
16: private final HttpSessionListener[] sessList;
17: private final String serverId;
18: private final String delimiter;
19:
20: public DefaultWebAppConfig(final int sessTimeoutSeconds,
21: final HttpSessionAttributeListener[] attrList,
22: final HttpSessionListener[] sessList,
23: final String delimiter, final String serverId) {
24: this .sessTimeoutSeconds = sessTimeoutSeconds;
25: this .attrList = attrList;
26: this .sessList = sessList;
27: this .delimiter = delimiter;
28: this .serverId = serverId;
29: }
30:
31: public String __tc_session_getCookieComment() {
32: return null;
33: }
34:
35: public String __tc_session_getCookieDomain() {
36: return null;
37: }
38:
39: public int __tc_session_getCookieMaxAgeSecs() {
40: return ConfigProperties.defaultCookieMaxAge;
41: }
42:
43: public String __tc_session_getCookieName() {
44: return null;
45: }
46:
47: public String __tc_session_getCookiePath() {
48: return null;
49: }
50:
51: public boolean __tc_session_getCookieSecure() {
52: return ConfigProperties.defaultCookieSecure;
53: }
54:
55: public boolean __tc_session_getCookiesEnabled() {
56: return ConfigProperties.defaultCookiesEnabled;
57: }
58:
59: public HttpSessionAttributeListener[] __tc_session_getHttpSessionAttributeListeners() {
60: return attrList;
61: }
62:
63: public HttpSessionListener[] __tc_session_getHttpSessionListener() {
64: return sessList;
65: }
66:
67: public int __tc_session_getIdLength() {
68: return ConfigProperties.defaultIdLength;
69: }
70:
71: public String __tc_session_getServerId() {
72: return serverId;
73: }
74:
75: public int __tc_session_getSessionTimeoutSecs() {
76: return sessTimeoutSeconds;
77: }
78:
79: public boolean __tc_session_getTrackingEnabled() {
80: return ConfigProperties.defaultTrackingEnabled;
81: }
82:
83: public boolean __tc_session_getURLRewritingEnabled() {
84: return ConfigProperties.defaultUrlEnabled;
85: }
86:
87: public String __tc_session_getSessionDelimiter() {
88: return delimiter;
89: }
90:
91: }
|