public interface BayeuxContext
The Bayeux Context provides information about the current context of a Bayeux message.
This information may be from an associated HTTP request, or from a HTTP request originally used to establish the connection to the server (for example in a WebSocket upgrade).
-
Method Summary
Modifier and TypeMethodDescriptiongetContextAttribute
(String name) getHeaderValues
(String name) getParameter
(String name) getParameterValues
(String name) getRequestAttribute
(String name) getSessionAttribute
(String name) Returns an HTTP session attribute value.getURL()
boolean
isSecure()
boolean
isUserInRole
(String role)
-
Method Details
-
getUserPrincipal
-
isUserInRole
- Parameters:
role
- the role to check whether the user belongs to- Returns:
- true if there is a known user and they are in the given role
-
getRemoteAddress
SocketAddress getRemoteAddress()- Returns:
- the remote socket address
-
getLocalAddress
SocketAddress getLocalAddress()- Returns:
- the local socket address
-
getHeader
-
getHeaderValues
-
getParameter
-
getParameterValues
-
getCookie
-
getContextAttribute
-
getRequestAttribute
-
getSessionAttribute
-
getContextPath
String getContextPath()- Returns:
- the web application context path
-
getURL
String getURL()- Returns:
- the full request URI complete with query string if present
-
getLocales
-
getProtocol
String getProtocol()- Returns:
- a string containing the protocol name and version number
-
isSecure
boolean isSecure()- Returns:
- whether the request was made over a secure transport
-