001: /**
002: *
003: */package clime.messadmin.model;
004:
005: import java.security.Principal;
006: import java.util.Date;
007: import java.util.List;
008: import java.util.Locale;
009: import java.util.Map;
010:
011: import javax.servlet.http.HttpSession;
012:
013: /**
014: * @author Cédrik LIME
015: */
016: public interface ISessionInfo extends HttpSession {
017:
018: // Inherited methods from HttpSession
019:
020: //public long getCreationTime();
021: //public long getLastAccessedTime();
022: //public int getMaxInactiveInterval();
023: //public void invalidate();
024: //public boolean isNew();
025: //public void removeAttribute(String name);
026: //public void setMaxInactiveInterval(int interval);
027:
028: // Methods from ISessionInfo
029:
030: /**
031: * Returns the session attributes as a Map.
032: *
033: * @return an <code>Map<String,Object></code> containing the
034: * attributes
035: *
036: * @exception IllegalStateException if this method is called on an
037: * invalidated session
038: *
039: * @see javax.servlet.http.HttpSession#getAttributeNames()
040: * @see javax.servlet.http.HttpSession#getAttribute(java.lang.String)
041: */
042: public Map/*<String,Object>*/getAttributes();
043:
044: /**
045: * @return number of exceptions generated during request processing
046: */
047: public int getNErrors();
048:
049: /**
050: * @return last error generated during request processing, or <code>null</code> if none
051: */
052: public ErrorData getLastError();
053:
054: public String getLastRequestURL();
055:
056: public String getRemoteHost();
057:
058: public Principal getUserPrincipal();
059:
060: public String getRemoteUser();
061:
062: public int getLastResponseStatus();
063:
064: public int getHits();
065:
066: public long getRequestLastLength();
067:
068: public long getResponseLastLength();
069:
070: public long getRequestMinLength();
071:
072: public long getResponseMinLength();
073:
074: public Date getRequestMinLengthDate();
075:
076: public Date getResponseMinLengthDate();
077:
078: public long getRequestMaxLength();
079:
080: public long getResponseMaxLength();
081:
082: public Date getRequestMaxLengthDate();
083:
084: public Date getResponseMaxLengthDate();
085:
086: public long getRequestTotalLength();
087:
088: public long getResponseTotalLength();
089:
090: public double getRequestMeanLength();
091:
092: public double getResponseMeanLength();
093:
094: public double getRequestStdDevLength();
095:
096: public double getResponseStdDevLength();
097:
098: public Date getLastRequestDate();
099:
100: public Date getLastResponseDate();
101:
102: public boolean isSecure();
103:
104: public boolean isSerializable();
105:
106: public long getSize();
107:
108: public String getUserAgent();
109:
110: /**
111: * @see javax.servlet.http.HttpServletRequest#getAuthType()
112: */
113: public String getAuthType();
114:
115: public String getReferer();
116:
117: public int getLastUsedTime();
118:
119: public int getMinUsedTime();
120:
121: public Date getMinUsedTimeDate();
122:
123: public int getMaxUsedTime();
124:
125: public Date getMaxUsedTimeDate();
126:
127: public int getTotalUsedTime();
128:
129: public double getMeanUsedTime();
130:
131: public double getStdDevUsedTime();
132:
133: public int getIdleTime();
134:
135: public int getTTL();
136:
137: public int getAge();
138:
139: public Object getGuessedUser();
140:
141: public Locale getGuessedLocale();
142:
143: /**
144: * cipher suite
145: * @see #isSecure()
146: */
147: public String getSslCipherSuite();
148:
149: /**
150: * bit size of the algorithm
151: * @see #isSecure()
152: */
153: public Integer getSslAlgorithmSize();
154:
155: // TODO see if this is not too expensive (memory) to keep
156: // /**
157: // * The order of this array is defined as being in ascending order of trust. The first
158: // * certificate in the chain is the one set by the client, the next is the one used to
159: // * authenticate the first, and so on.
160: // * @see #isSecure()
161: // */
162: // public X509Certificate[] getSslCertificates();
163:
164: /**
165: * @return session-specific data (user plugin)
166: */
167: public List/*<Map.Entry<String, String>>*/getSessionSpecificData();
168: }
|