You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by me...@apache.org on 2011/06/21 13:06:56 UTC
svn commit: r1137955 [3/3] - in /click/trunk/click:
documentation/docs/roadmap-changes.html
framework/src/org/apache/click/util/SessionMap.java
Modified: click/trunk/click/framework/src/org/apache/click/util/SessionMap.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/SessionMap.java?rev=1137955&r1=1137954&r2=1137955&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/util/SessionMap.java (original)
+++ click/trunk/click/framework/src/org/apache/click/util/SessionMap.java Tue Jun 21 11:06:56 2011
@@ -65,6 +65,73 @@ public class SessionMap implements Map<S
}
/**
+ * Returns the time when this session was created, measured in milliseconds
+ * since midnight January 1, 1970 GMT.
+ *
+ * @see javax.servlet.http.HttpSession#getCreationTime()
+ *
+ * @return the session creation time, or -1 if no session is available
+ */
+ public long getCreationTime() {
+ if (session != null) {
+ return session.getCreationTime();
+ } else {
+ return -1;
+ }
+ }
+
+ /**
+ * Returns a string containing the unique identifier assigned to this
+ * session. The identifier is assigned by the servlet container and is
+ * implementation dependent.
+ *
+ * @see javax.servlet.http.HttpSession#getId()
+ *
+ * @return the session id, or null if no session is available
+ */
+ public String getId() {
+ if (session != null) {
+ return session.getId();
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the last time the client sent a request associated with this
+ * session, as the number of milliseconds since midnight January 1, 1970 GMT,
+ * and marked by the time the container received the request.
+ *
+ * @see javax.servlet.http.HttpSession#getLastAccessedTime()
+ *
+ * @return the session last accessed time, or -1 if no session is available
+ */
+ public long getLastAccessedTime() {
+ if (session != null) {
+ return session.getLastAccessedTime();
+ } else {
+ return -1;
+ }
+ }
+
+ /**
+ * Specifies the time, in seconds, between client requests before the servlet
+ * container will invalidate this session. A negative time indicates the
+ * session should never timeout.
+ *
+ * @see javax.servlet.http.HttpSession#getMaxInactiveInterval()
+ *
+ * @return the session max inactive interval in seconds, or -1 if no session is available
+ */
+ public int getMaxInactiveInterval() {
+ if (session != null) {
+ return session.getMaxInactiveInterval();
+ } else {
+ return -1;
+ }
+ }
+
+ /**
* @see java.util.Map#size()
*/
public int size() {