Search in sources :

Example 1 with HttpSessionContext

use of javax.servlet.http.HttpSessionContext in project tomee by apache.

the class HttpSessionImpl method getSessionContext.

@Override
public HttpSessionContext getSessionContext() {
    touch();
    final SessionManager component = SystemInstance.get().getComponent(SessionManager.class);
    return new HttpSessionContext() {

        @Override
        public javax.servlet.http.HttpSession getSession(final String sessionId) {
            final HttpSessionEvent event = component.findSession(sessionId);
            return event == null ? null : event.getSession();
        }

        @Override
        public Enumeration<String> getIds() {
            return Collections.enumeration(component.findSessionIds());
        }
    };
}
Also used : SessionManager(org.apache.openejb.server.httpd.session.SessionManager) HttpSessionContext(javax.servlet.http.HttpSessionContext) HttpSessionEvent(javax.servlet.http.HttpSessionEvent)

Aggregations

HttpSessionContext (javax.servlet.http.HttpSessionContext)1 HttpSessionEvent (javax.servlet.http.HttpSessionEvent)1 SessionManager (org.apache.openejb.server.httpd.session.SessionManager)1