java.lang.Object
io.helidon.security.SecurityEnvironment.Builder
- All Implemented Interfaces:
Builder<SecurityEnvironment.Builder,
,SecurityEnvironment> Supplier<SecurityEnvironment>
- Enclosing class:
SecurityEnvironment
public static final class SecurityEnvironment.Builder
extends Object
implements Builder<SecurityEnvironment.Builder,SecurityEnvironment>
A fluent API builder for
SecurityEnvironment
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(String key, Object value) Add an attribute to this environment.build()
Build the instance from this builder.We may want to clear existing headers, such as when deriving an environment for outbound calls.We may want to clear existing query parameters.Add a single-value header.Add a multi-value header.Transport headers (such as HTTP headers, JMS headers).Method that is requested (such as GET/POST for http).Path that is requested (such as URI for http, without protocol, server and port).queryParam
(String paramName, String value) Add a single-value query parameter.queryParam
(String paramName, List<String> values) Add a multivalued query parameter.queryParams
(UriQuery queryParams) Add query parameters of the request.Configure target URI.time
(SecurityTime time) Use the defined time to obtain current time.Transport we are implementing (such as http, https).
-
Field Details
-
DEFAULT_TRANSPORT
Default transport is "http".- See Also:
-
DEFAULT_METHOD
Default method is "GET".- See Also:
-
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<SecurityEnvironment.Builder,
SecurityEnvironment> - Returns:
- instance of the built type
-
addAttribute
Add an attribute to this environment.- Parameters:
key
- name of the attributevalue
- value of the attribute- Returns:
- updated builder instance
-
headers
Transport headers (such as HTTP headers, JMS headers). Headers are case insensitive.- Parameters:
headers
- header map- Returns:
- this instance
-
clearHeaders
We may want to clear existing headers, such as when deriving an environment for outbound calls.- Returns:
- this instance
-
header
Add a single-value header. Note that if methodheaders(Map)
is called after this method, it will remove changes by this method.- Parameters:
header
- header namevalue
- header value- Returns:
- this instance
-
header
Add a multi-value header. Note that if methodheaders(Map)
is called after this method, it may remove changes by this method.- Parameters:
header
- header namevalues
- header values- Returns:
- this instance
-
targetUri
Configure target URI.- Parameters:
uri
- target URI being (or to be) called. If this is an unusual protocol, build the uri following similar pattern to HTTP (jms://host:port/connFactory/queueJndi; socket://host:port; teleport://newyork/broadway/44- Returns:
- this instance
-
path
Path that is requested (such as URI for http, without protocol, server and port).- Parameters:
path
- the path- Returns:
- this instance
-
method
Method that is requested (such as GET/POST for http). Default is "GET".- Parameters:
method
- the method- Returns:
- this instance
-
transport
Transport we are implementing (such as http, https). Default isDEFAULT_TRANSPORT
.- Parameters:
transport
- the transport- Returns:
- this instance
-
time
Use the defined time to obtain current time.- Parameters:
time
- SecurityTime that allows for explicit values being set (e.g. for unit tests)- Returns:
- updated builder instance
-
queryParam
Add a single-value query parameter. Note that if methodqueryParams(UriQuery)
is called after this method, it will remove changes by this method.- Parameters:
paramName
- parameter namevalue
- parameter value- Returns:
- this instance
-
queryParam
Add a multivalued query parameter. Note that if methodqueryParams(UriQuery)
is called after this method, it will remove changes by this method.- Parameters:
paramName
- parameter namevalues
- parameter values- Returns:
- this instance
-
queryParams
Add query parameters of the request.- Parameters:
queryParams
- request query parameters- Returns:
- this instance
-
clearQueryParams
We may want to clear existing query parameters.- Returns:
- this instance
-