@Test
public void doFilterSessionContext() throws Exception {
doFilter(new DoInFilter() {
@Override
public void doFilter(HttpServletRequest wrappedRequest) {
HttpSessionContext sessionContext = wrappedRequest.getSession()
.getSessionContext();
assertThat(sessionContext).isNotNull();
assertThat(sessionContext.getSession("a")).isNull();
assertThat(sessionContext.getIds()).isNotNull();
assertThat(sessionContext.getIds().hasMoreElements()).isFalse();
try {
sessionContext.getIds().nextElement();
fail("Expected Exception");
}
catch (NoSuchElementException ignored) {
}
}
});
}
java类javax.servlet.http.HttpSessionContext的实例源码
SessionRepositoryFilterTests.java 文件源码
项目:spring-session
阅读 57
收藏 0
点赞 0
评论 0
HttpSessionImpl.java 文件源码
项目:tomee
阅读 37
收藏 0
点赞 0
评论 0
@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());
}
};
}
StandardSession.java 文件源码
项目:lams
阅读 35
收藏 0
点赞 0
评论 0
/**
* Return the session context with which this session is associated.
*
* @deprecated As of Version 2.1, this method is deprecated and has no
* replacement. It will be removed in a future version of the
* Java Servlet API.
*/
public HttpSessionContext getSessionContext() {
if (sessionContext == null)
sessionContext = new StandardSessionContext();
return (sessionContext);
}
StandardSession.java 文件源码
项目:jerrydog
阅读 42
收藏 0
点赞 0
评论 0
/**
* Return the session context with which this session is associated.
*
* @deprecated As of Version 2.1, this method is deprecated and has no
* replacement. It will be removed in a future version of the
* Java Servlet API.
*/
public HttpSessionContext getSessionContext() {
if (sessionContext == null)
sessionContext = new StandardSessionContext();
return (sessionContext);
}
StandardSession.java 文件源码
项目:HowTomcatWorks
阅读 27
收藏 0
点赞 0
评论 0
/**
* Return the session context with which this session is associated.
*
* @deprecated As of Version 2.1, this method is deprecated and has no
* replacement. It will be removed in a future version of the
* Java Servlet API.
*/
public HttpSessionContext getSessionContext() {
if (sessionContext == null)
sessionContext = new StandardSessionContext();
return (sessionContext);
}
Serve.java 文件源码
项目:couchbase-lite-java-listener
阅读 43
收藏 0
点赞 0
评论 0
AcmeSession(String id, int inactiveInterval, ServletContext servletContext, HttpSessionContext sessionContext) {
// new
// Exception("Session created with: "+servletContext).printStackTrace();
// //!!!
createTime = System.currentTimeMillis();
this.id = id;
this.inactiveInterval = inactiveInterval;
this.servletContext = servletContext;
this.sessionContext = sessionContext;
}
HttpSessionMock.java 文件源码
项目:vraptor4
阅读 28
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return new HttpSessionContext() {
@Override
public HttpSession getSession(String s) {
return HttpSessionMock.this;
}
@Override
public Enumeration<String> getIds() {
return new Enumeration<String>() {
private boolean hasNext = true;
@Override
public boolean hasMoreElements() {
return hasNext;
}
@Override
public String nextElement() {
hasNext = false;
return getId();
}
};
}
};
}
SessionImpl.java 文件源码
项目:session-share
阅读 37
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return null;
}
TestHttpSession.java 文件源码
项目:InComb
阅读 65
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return null;
}
JbootSessionWapperBase.java 文件源码
项目:jboot
阅读 33
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
throw new RuntimeException("getSessionContext method not finished.");
}
HttpSessionImpl.java 文件源码
项目:tasfe-framework
阅读 23
收藏 0
点赞 0
评论 0
@SuppressWarnings("deprecation")
@Override
public HttpSessionContext getSessionContext() {
throw new IllegalStateException("As of Version 2.1, this method is deprecated and has no replacement.");
}
HttpSessionStub.java 文件源码
项目:oscm
阅读 38
收藏 0
点赞 0
评论 0
public HttpSessionContext getSessionContext() {
throw new UnsupportedOperationException();
}
ExpiringSessionHttpSession.java 文件源码
项目:lemon
阅读 35
收藏 0
点赞 0
评论 0
public HttpSessionContext getSessionContext() {
return NOOP_SESSION_CONTEXT;
}
CheckSerializationConfigurator.java 文件源码
项目:myfaces-trinidad
阅读 34
收藏 0
点赞 0
评论 0
public HttpSessionContext getSessionContext()
{
return _delegate.getSessionContext();
}
InternalHttpServletRequest.java 文件源码
项目:convertigo-engine
阅读 40
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return null;
}
StandardSessionFacade.java 文件源码
项目:lams
阅读 38
收藏 0
点赞 0
评论 0
public HttpSessionContext getSessionContext() {
return session.getSessionContext();
}
HttpSessionImpl.java 文件源码
项目:lams
阅读 34
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return null;
}
ServletUnitHttpSession.java 文件源码
项目:lams
阅读 42
收藏 0
点赞 0
评论 0
/**
* @deprecated no replacement.
**/
public HttpSessionContext getSessionContext() {
return null;
}
StandardSessionFacade.java 文件源码
项目:jerrydog
阅读 36
收藏 0
点赞 0
评论 0
public HttpSessionContext getSessionContext() {
return session.getSessionContext();
}
ServletUnitHttpSession.java 文件源码
项目:parabuild-ci
阅读 39
收藏 0
点赞 0
评论 0
/**
* @deprecated no replacement.
**/
public HttpSessionContext getSessionContext() {
return null;
}
Session.java 文件源码
项目:simple-session
阅读 34
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return EMPTY_SESSION_CONTEXT;
}
MockHttpServletRequest.java 文件源码
项目:jaffa-framework
阅读 30
收藏 0
点赞 0
评论 0
/**
* @deprecated
*/
public HttpSessionContext getSessionContext() {
return null;
}
JwHttpSession.java 文件源码
项目:jw
阅读 35
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return SessionContext.getSession().getSessionContext();
}
RepositoryBackedHttpSession.java 文件源码
项目:HttpSessionReplacer
阅读 33
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
throw new UnsupportedOperationException("getSessionContext() is deprecated");
}
MockSession.java 文件源码
项目:geeMVC-Java-MVC-Framework
阅读 32
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return null;
}
HttpSessionStub.java 文件源码
项目:sonar-activedirectory
阅读 31
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return null;
}
SessionWrapper.java 文件源码
项目:leopard
阅读 32
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
throw new UnsupportedOperationException("Not Impl.");
}
ProblemCheckFilter.java 文件源码
项目:OSCAR-ConCert
阅读 27
收藏 0
点赞 0
评论 0
public HttpSessionContext getSessionContext()
{
return session.getSessionContext();
}
VertxHttpSession.java 文件源码
项目:vaadin-vertx-samples
阅读 31
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
throw new UnsupportedOperationException("Deprecated");
}
HttpSessionWrapper.java 文件源码
项目:puzzle
阅读 36
收藏 0
点赞 0
评论 0
@Override
public HttpSessionContext getSessionContext() {
return delegate.getSessionContext();
}