Class TransportInvocationContext
java.lang.Object
com.levigo.jadice.web.server.internal.AbstractInvocationContext
com.levigo.jadice.web.transport.server.TransportInvocationContext
- All Implemented Interfaces:
InvocationContext
,ServletInvocationContext
public class TransportInvocationContext
extends com.levigo.jadice.web.server.internal.AbstractInvocationContext
implements ServletInvocationContext
This is the invocation context of the adaptive transport layer utilizing implementations to
obtain the
HttpSession
and optionally the HttpServletRequest
.-
Constructor Summary
ConstructorsConstructorDescriptionTransportInvocationContext
(jakarta.servlet.http.HttpSession httpSession, Principal userPrincipal, com.levigo.jadice.web.transport.server.session.internal.MessageClient client) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.servlet.http.HttpSession
Returns the associatedHttpSession
if available.Returns a session-id if the Context contains session information.Returns thePrincipal
identifying the user sending the message.Methods inherited from class com.levigo.jadice.web.server.internal.AbstractInvocationContext
create, ensureValid, isValid, setValid
-
Constructor Details
-
TransportInvocationContext
public TransportInvocationContext(jakarta.servlet.http.HttpSession httpSession, Principal userPrincipal, com.levigo.jadice.web.transport.server.session.internal.MessageClient client) - Parameters:
httpSession
- The HTTP-session of the invocation.client
-
-
-
Method Details
-
getSession
Description copied from interface:ServletInvocationContext
Returns the associatedHttpSession
if available.This method must be called within the
ContextualFactory.create(com.levigo.jadice.web.server.InvocationContext)
method. Later calls result in an IllegalStateException.- Specified by:
getSession
in interfaceServletInvocationContext
- Returns:
- the associated HttpSession for the current request.
- Throws:
IllegalStateException
-
getUserPrincipal
Description copied from interface:ServletInvocationContext
Returns thePrincipal
identifying the user sending the message.- Specified by:
getUserPrincipal
in interfaceServletInvocationContext
- Returns:
- the user
Principal
-
getQueryString
- Specified by:
getQueryString
in interfaceServletInvocationContext
-
getClientId
- Specified by:
getClientId
in interfaceInvocationContext
-
getSessionId
Description copied from class:com.levigo.jadice.web.server.internal.AbstractInvocationContext
Returns a session-id if the Context contains session information.- Overrides:
getSessionId
in classcom.levigo.jadice.web.server.internal.AbstractInvocationContext
- Returns:
- session id or null if no session is available
-