public List < HttpSession > getHttpSessionsForContext ( Context context ) { List < HttpSession > sessions = new LinkedList <> ( ) ; if ( this . sessions == null ) { return sessions ; } synchronized ( sessionLock ) { for ( Entry < String , HttpSessionsSite > e : this . sessions . entrySet ( ) ) { String siteName = e . getKey ( ) ; siteName = "http://" + siteName ; if ( context . isInContext ( siteName ) ) sessions . addAll ( e . getValue ( ) . getHttpSessions ( ) ) ; } } return sessions ; }
Builds and returns a list of http sessions that correspond to a given context .