| Modifier and Type | Class and Description |
|---|---|
| public static class | RequestContext.
|
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private final Object | |
| private final RequestContext. | |
| private Map | |
| private final String | |
| private final String | |
| private final URI | |
| private final boolean | |
| private final String | |
| private final int | |
| private final TyrusConfiguration | |
| private final Principal |
| Access | Constructor and Description |
|---|---|
| private | RequestContext(URI requestURI, String queryString, Object httpSession, boolean secure, Principal userPrincipal, RequestContext.
|
| Modifier and Type | Method and Description |
|---|---|
| public String | getHeader(String
header name. name)Implements abstract org. Returns the header value corresponding to the name. |
| public Map | Returns: headers map. List items are corresponding to header declaration in HTTP request.Implements jakarta. Get headers. |
| public Object | getHttpSession()
Implements jakarta. Return a reference to the HttpSession that the web socket handshake that started this conversation was part of, if the implementation is part of a Java EE web container. |
| public Map | getParameterMap()
Implements jakarta. Return the request parameters associated with the request. |
| public String | getQueryString()
Implements jakarta. Return the query string associated with the request. |
| public String | Returns: aString containing the IP address of the client that sent the request or null when
method is called on client-side.Get the Internet Protocol (IP) address of the client or last proxy that sent the request. |
| public URI | getRequestURI()
Implements jakarta. Return the request URI of the handshake request. |
| public String | getRequestUri()
Implements abstract org. Get the undecoded request uri (up to the query string) of underlying HTTP handshake request. |
| public String | Returns: aString Returns the host name of the server to which the request was sent or null when
method is called on client-side.Returns the host name of the server to which the request was sent. |
| public int | Returns: a port of the client that sent the request.Get the port of the last client or proxy that sent the request. |
| pack-priv TyrusConfiguration | |
| public Principal | getUserPrincipal()
Implements jakarta. Return the authenticated user or |
| public boolean | isSecure()
Implements abstract org. Indicates whether this request was made using a secure channel (such as HTTPS). |
| public boolean | isUserInRole(String
the role being checked. role)Implements jakarta. Checks whether the current user is in the given role. |
| public void |
| headers | back to summary |
|---|---|
| private Map<String, List<String>> headers | |
| httpSession | back to summary |
|---|---|
| private final Object httpSession | |
| isUserInRoleDelegate | back to summary |
|---|---|
| private final RequestContext. | |
| parameterMap | back to summary |
|---|---|
| private Map<String, List<String>> parameterMap | |
| queryString | back to summary |
|---|---|
| private final String queryString | |
| remoteAddr | back to summary |
|---|---|
| private final String remoteAddr | |
| requestURI | back to summary |
|---|---|
| private final URI requestURI | |
| secure | back to summary |
|---|---|
| private final boolean secure | |
| serverAddr | back to summary |
|---|---|
| private final String serverAddr | |
| serverPort | back to summary |
|---|---|
| private final int serverPort | |
| tyrusConfiguration | back to summary |
|---|---|
| private final TyrusConfiguration tyrusConfiguration | |
| userPrincipal | back to summary |
|---|---|
| private final Principal userPrincipal | |
| RequestContext | back to summary |
|---|---|
| private RequestContext(URI requestURI, String queryString, Object httpSession, boolean secure, Principal userPrincipal, RequestContext. | |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) Implements abstract org. Returns the header value corresponding to the name. | |
| getHeaders | back to summary |
|---|---|
| public Map Implements jakarta. Get headers. | |
| getHttpSession | back to summary |
|---|---|
| public Object getHttpSession() Implements jakarta. Doc from jakarta. Return a reference to the HttpSession that the web socket handshake that started this conversation was part of, if the implementation is part of a Java EE web container. | |
| getParameterMap | back to summary |
|---|---|
| public Map Implements jakarta. Doc from jakarta. Return the request parameters associated with the request. | |
| getQueryString | back to summary |
|---|---|
| public String getQueryString() Implements jakarta. Doc from jakarta. Return the query string associated with the request. | |
| getRemoteAddr | back to summary |
|---|---|
| public String getRemoteAddr() Get the Internet Protocol (IP) address of the client or last proxy that sent the request. | |
| getRequestURI | back to summary |
|---|---|
| public URI getRequestURI() Implements jakarta. Doc from jakarta. Return the request URI of the handshake request. | |
| getRequestUri | back to summary |
|---|---|
| public String getRequestUri() Implements abstract org. Doc from org. Get the undecoded request uri (up to the query string) of underlying HTTP handshake request. | |
| getServerAddr | back to summary |
|---|---|
| public String getServerAddr() Returns the host name of the server to which the request was sent. | |
| getServerPort | back to summary |
|---|---|
| public int getServerPort() Get the port of the last client or proxy that sent the request.
| |
| getTyrusConfiguration | back to summary |
|---|---|
| pack-priv TyrusConfiguration getTyrusConfiguration() | |
| getUserPrincipal | back to summary |
|---|---|
| public Principal getUserPrincipal() Implements jakarta. Doc from jakarta. Return the authenticated user or | |
| isSecure | back to summary |
|---|---|
| public boolean isSecure() Implements abstract org. Doc from org. Indicates whether this request was made using a secure channel (such as HTTPS).
| |
| isUserInRole | back to summary |
|---|---|
| public boolean isUserInRole(String role) Implements jakarta. Doc from jakarta. Checks whether the current user is in the given role. Roles and role membership can be defined using deployment
descriptors of the containing WAR file, if running in a Java EE web container. If the user has not been
authenticated, the method returns | |
| lock | back to summary |
|---|---|
| public void lock() Make headers and parameter map read-only. | |
RequestContext builder.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | RequestContext.
Is user in role delegate. |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private Object | |
| private RequestContext. | |
| private Map | |
| private String | |
| private String | |
| private URI | |
| private boolean | |
| private String | |
| private int | |
| private Map | |
| private Principal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public RequestContext | |
| public static RequestContext. | |
| public static RequestContext. | Returns: builder instance.request context. requestContext)Create builder instance based on provided |
| public RequestContext. | Returns: updatedRequestContext. instance.jakarta.servlet.http.HttpSession session to be set.Set http session. |
| public RequestContext. | Returns: updatedRequestContext. instance.delegate for isUserInRoleDelegateRequestContext#isUserInRole(String).Set delegate for |
| public RequestContext. | Returns: updatedRequestContext. instance.parameter map. Takes map returned from ServletRequest#getParameterMap. parameterMap)Set parameter map. |
| public RequestContext. | Returns: updatedRequestContext. instance.query string to be set. queryString)Set query string. |
| public RequestContext. | Returns: updatedRequestContext. instance.remote address to be set. remoteAddr)Set remote address. |
| public RequestContext. | Returns: updatedRequestContext. instance.request URI to be set. requestURI)Set request URI. |
| public RequestContext. | Returns: updatedRequestContext. instance.secure state to be set. secure)Set secure state. |
| public RequestContext. | Returns: updatedRequestContext. instance.server address to be set. serverAddr)Set server address or hostname. |
| public RequestContext. | Returns: updatedRequestContext. instance.server port to be set. serverPort)Set server port. |
| public RequestContext. | |
| public RequestContext. | Returns: updatedRequestContext. instance.principal to be set. principal)Set |
| headers | back to summary |
|---|---|
| private Map<String, List<String>> headers | |
| httpSession | back to summary |
|---|---|
| private Object httpSession | |
| isUserInRoleDelegate | back to summary |
|---|---|
| private RequestContext. | |
| parameterMap | back to summary |
|---|---|
| private Map<String, List<String>> parameterMap | |
| queryString | back to summary |
|---|---|
| private String queryString | |
| remoteAddr | back to summary |
|---|---|
| private String remoteAddr | |
| requestURI | back to summary |
|---|---|
| private URI requestURI | |
| secure | back to summary |
|---|---|
| private boolean secure | |
| serverAddr | back to summary |
|---|---|
| private String serverAddr | |
| serverPort | back to summary |
|---|---|
| private int serverPort | |
| tyrusProperties | back to summary |
|---|---|
| private Map<String, Object> tyrusProperties | |
| userPrincipal | back to summary |
|---|---|
| private Principal userPrincipal | |
| Builder | back to summary |
|---|---|
| public Builder() | |
| build | back to summary |
|---|---|
| public RequestContext build() Build
| |
| create | back to summary |
|---|---|
| public static RequestContext. Create empty builder.
| |
| create | back to summary |
|---|---|
| public static RequestContext. Create builder instance based on provided
| |
| httpSession | back to summary |
|---|---|
| public RequestContext. Set http session.
| |
| isUserInRoleDelegate | back to summary |
|---|---|
| public RequestContext. Set delegate for
| |
| parameterMap | back to summary |
|---|---|
| public RequestContext. Set parameter map.
| |
| queryString | back to summary |
|---|---|
| public RequestContext. Set query string.
| |
| remoteAddr | back to summary |
|---|---|
| public RequestContext. Set remote address.
| |
| requestURI | back to summary |
|---|---|
| public RequestContext. Set request URI.
| |
| secure | back to summary |
|---|---|
| public RequestContext. Set secure state.
| |
| serverAddr | back to summary |
|---|---|
| public RequestContext. Set server address or hostname.
| |
| serverPort | back to summary |
|---|---|
| public RequestContext. Set server port.
| |
| tyrusProperties | back to summary |
|---|---|
| public RequestContext. Set properties for Tyrus framework. | |
| userPrincipal | back to summary |
|---|---|
| public RequestContext. Set
| |
Cannot easily query ServletContext or HttpServletRequest for this information, since it is stored only as object.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: a boolean indicating whether the user making this request belongs to a given role; false if the user has not been authenticated.a String specifying the name of the role. role)Returns a boolean indicating whether the authenticated user is included in the specified logical "role". |
| isUserInRole | back to summary |
|---|---|
| public boolean isUserInRole(String role) Returns a boolean indicating whether the authenticated user is included in the specified logical "role". Roles and role membership can be defined using deployment descriptors. If the user has not been authenticated, the method returns false.
| |