The WikiSession's are stored both in the remote user
HttpSession and in the SessionMonitor for the WikeEngine.
This class must be configured as a session listener in the
web.xml for the wiki web application.
Looks up the wiki session associated with a user's Http session
and adds it to the session cache. This method will return the
"guest session" as constructed by
WikiSession.guestSession(WikiEngine) if the HttpSession is not currently associated with a WikiSession.
This method is guaranteed to return a non-null WikiSession.
Internally, the session is stored in a HashMap; keys are
the HttpSession objects, while the values are
java.lang.ref.WeakReference -wrapped WikiSessions.
Parameters: session - the HTTP session the wiki session
Fires a WikiSecurityEvent to all registered listeners.
Parameters: type - the event type Parameters: principal - the user principal associated with this session Parameters: session - the wiki session since: 2.4.75
Returns the instance of the SessionMonitor for this wiki.
Only one SessionMonitor exists per WikiEngine.
Parameters: engine - the wiki engine the session monitor
Returns the current wiki users as a sorted array of
Principal objects. The principals are those returned by
each WikiSession's
WikiSession.getUserPrincipal 's
method.
To obtain the list of current WikiSessions, we iterate
through our session Map and obtain the list of values,
which are WikiSessions wrapped in
java.lang.ref.WeakReference objects. Those WeakReferences whose get()
method returns non-null values are valid
sessions.