Interface MessageContext
- All Known Implementing Classes:
HttpMessageContext,WebSocketContext
public interface MessageContext
A MessageContext carries information about the corresponding message, such as the ID of the
MessageClient that sent the message, the user Principal, requested URI and and
query string.-
Method Summary
Modifier and TypeMethodDescriptionReturns the client id of the client which did send the message associated with this message context.jakarta.servlet.http.HttpSessionReturns theHttpSessionof the message associated with this message context.Returns the query string contained in the message for this context.Returns the URI requested by the message for this context from the protocol up to the query string.Returns thePrincipalidentifying the user sending the message.
-
Method Details
-
getUserPrincipal
Principal getUserPrincipal()Returns thePrincipalidentifying the user sending the message.- Returns:
- the user
Principal
-
getRequestURI
String getRequestURI()Returns the URI requested by the message for this context from the protocol up to the query string.Example:
- https://somepage.com/somesite?key=value
- RequestURI: somepage.com/somesite
- Returns:
- the requested URI
-
getQueryString
String getQueryString()Returns the query string contained in the message for this context.Example:
- https://somepage.com/somesite?key=value
- QueryString: key=value
- Returns:
- the query string
-
getClientID
String getClientID()Returns the client id of the client which did send the message associated with this message context.- Returns:
- the client id
-
getHTTPSession
jakarta.servlet.http.HttpSession getHTTPSession()Returns theHttpSessionof the message associated with this message context.- Returns:
- the
HttpSession
-