diff options
author | Andrei Belov <defan@nginx.com> | 2019-03-01 18:30:09 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2019-03-01 18:30:09 +0300 |
commit | 3c3720cba7154bc168cbd00c74817626bb53e140 (patch) | |
tree | da1500f7c6bd5e90ecf45299b6f4b19a29d521cd /src/java/nginx/unit/UnitSessionCookieConfig.java | |
parent | 315a864c27aa27a48c013c4a1ef67a099ffea894 (diff) | |
parent | df02b03824065389c73213b19736140442cf63bc (diff) | |
download | unit-3c3720cba7154bc168cbd00c74817626bb53e140.tar.gz unit-3c3720cba7154bc168cbd00c74817626bb53e140.tar.bz2 |
Merged with the default branch.
Diffstat (limited to '')
-rw-r--r-- | src/java/nginx/unit/UnitSessionCookieConfig.java | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/java/nginx/unit/UnitSessionCookieConfig.java b/src/java/nginx/unit/UnitSessionCookieConfig.java new file mode 100644 index 00000000..e1b2ae04 --- /dev/null +++ b/src/java/nginx/unit/UnitSessionCookieConfig.java @@ -0,0 +1,110 @@ +package nginx.unit; + +import javax.servlet.SessionCookieConfig; + +/* + + <session-config> + <session-timeout>60</session-timeout> + <cookie-config></cookie-config> + <tracking-mode></tracking-mode> + </session-config> + + + */ +public class UnitSessionCookieConfig implements SessionCookieConfig { + + private static final String default_name = "JSESSIONID"; + + private String name = default_name; + private String domain; + private String path; + private String comment; + private boolean httpOnly = true; + private boolean secure = false; + private int maxAge = -1; + + @Override + public void setName(String name) + { + this.name = name; + } + + @Override + public String getName() + { + return name; + } + + @Override + public void setDomain(String domain) + { + this.domain = domain; + } + + @Override + public String getDomain() + { + return domain; + } + + @Override + public void setPath(String path) + { + this.path = path; + } + + @Override + public String getPath() + { + return path; + } + + @Override + public void setComment(String comment) + { + this.comment = comment; + } + + @Override + public String getComment() + { + return comment; + } + + @Override + public void setHttpOnly(boolean httpOnly) + { + this.httpOnly = httpOnly; + } + + @Override + public boolean isHttpOnly() + { + return httpOnly; + } + + @Override + public void setSecure(boolean secure) + { + this.secure = secure; + } + + @Override + public boolean isSecure() + { + return secure; + } + + @Override + public void setMaxAge(int maxAge) + { + this.maxAge = maxAge; + } + + @Override + public int getMaxAge() + { + return maxAge; + } +} |