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());
}
};
}
Aggregations