public interface ServletConnection
extends com.variant.client.Connection
Servlet-aware wrapper around bare client's implementation of Connection
.
Replaces bare client's session creation methods with ones which take an instance
of HttpServletRequest
and return the narrower, servlet-aware ServletSession
Modifier and Type | Method and Description |
---|---|
ServletSession |
getOrCreateSession(HttpServletRequest req)
Rewritten signature in terms of Servlet API.
|
ServletSession |
getOrCreateSession(java.lang.Object... userData)
Equivalent to
getOrCreateSession((HttpServletRequest)userData[0]) . |
java.util.Optional<ServletSession> |
getSession(HttpServletRequest req)
Rewritten signature in terms of Servlet API.
|
java.util.Optional<ServletSession> |
getSession(java.lang.Object... userData)
Equivalent to
getSession((HttpServletRequest)userData[0]) . |
java.util.Optional<ServletSession> |
getSessionById(java.lang.String sessionId)
Get an existing session by ID.
|
ServletSession getOrCreateSession(java.lang.Object... userData)
getOrCreateSession((HttpServletRequest)userData[0])
.
Use getOrCreateSession(HttpServletRequest)
instead.getOrCreateSession
in interface com.variant.client.Connection
java.util.Optional<ServletSession> getSession(java.lang.Object... userData)
getSession((HttpServletRequest)userData[0])
.
Use getSession(HttpServletRequest)
instead.getSession
in interface com.variant.client.Connection
java.util.Optional<ServletSession> getSessionById(java.lang.String sessionId)
getSessionById
in interface com.variant.client.Connection
Connection.getSessionById(String)
ServletSession getOrCreateSession(HttpServletRequest req)
getOrCreateSession
in interface com.variant.client.Connection
req
- java.util.Optional<ServletSession> getSession(HttpServletRequest req)
getSession
in interface com.variant.client.Connection
req
- Release 0.10.1. Updated 04 Sep 2019.
Copyright © 2019 Variant Inc.