Package org.glassfish.tyrus.core
Class RequestContext.Builder
java.lang.Object
org.glassfish.tyrus.core.RequestContext.Builder
- Enclosing class:
RequestContext
RequestContext
builder.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Is user in role delegate. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
BuildRequestContext
from given properties.static RequestContext.Builder
create()
Create empty builder.static RequestContext.Builder
create
(RequestContext requestContext) Create builder instance based on providedRequestContext
.httpSession
(Object httpSession) Set http session.isUserInRoleDelegate
(RequestContext.Builder.IsUserInRoleDelegate isUserInRoleDelegate) Set delegate forRequestContext.isUserInRole(String)
method.parameterMap
(Map<String, String[]> parameterMap) Set parameter map.queryString
(String queryString) Set query string.remoteAddr
(String remoteAddr) Set remote address.requestURI
(URI requestURI) Set request URI.secure
(boolean secure) Set secure state.serverAddr
(String serverAddr) Set server address or hostname.serverPort
(int serverPort) Set server port.tyrusProperties
(Map<String, Object> tyrusProperties) Set properties for Tyrus framework.userPrincipal
(Principal principal) SetPrincipal
.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
create
Create empty builder.- Returns:
- empty builder instance.
-
create
Create builder instance based on providedRequestContext
.- Parameters:
requestContext
- request context.- Returns:
- builder instance.
-
requestURI
Set request URI.- Parameters:
requestURI
- request URI to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
queryString
Set query string.- Parameters:
queryString
- query string to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
httpSession
Set http session.- Parameters:
httpSession
-jakarta.servlet.http.HttpSession
session to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
secure
Set secure state.- Parameters:
secure
- secure state to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
userPrincipal
SetPrincipal
.- Parameters:
principal
- principal to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
isUserInRoleDelegate
public RequestContext.Builder isUserInRoleDelegate(RequestContext.Builder.IsUserInRoleDelegate isUserInRoleDelegate) Set delegate forRequestContext.isUserInRole(String)
method.- Parameters:
isUserInRoleDelegate
- delegate forRequestContext.isUserInRole(String)
.- Returns:
- updated
RequestContext.Builder
instance.
-
parameterMap
Set parameter map.- Parameters:
parameterMap
- parameter map. Takes map returned from ServletRequest#getParameterMap.- Returns:
- updated
RequestContext.Builder
instance.
-
remoteAddr
Set remote address.- Parameters:
remoteAddr
- remote address to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
serverAddr
Set server address or hostname.- Parameters:
serverAddr
- server address to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
serverPort
Set server port.- Parameters:
serverPort
- server port to be set.- Returns:
- updated
RequestContext.Builder
instance.
-
tyrusProperties
Set properties for Tyrus framework.- Parameters:
tyrusProperties
-
-
build
BuildRequestContext
from given properties.- Returns:
- created
RequestContext
.
-