public static final class SecurityEnvironment.Builder extends Object implements Builder<SecurityEnvironment>
SecurityEnvironment.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_METHOD
Default method is "GET".
|
static String |
DEFAULT_TRANSPORT
Default transport is "http".
|
| Modifier and Type | Method and Description |
|---|---|
SecurityEnvironment.Builder |
addAttribute(String key,
Object value)
Add an attribute to this environment.
|
SecurityEnvironment |
build()
Build the instance from this builder.
|
SecurityEnvironment.Builder |
header(String header,
List<String> values)
Add a multi-value header.
|
SecurityEnvironment.Builder |
header(String header,
String value)
Add a single-value header.
|
SecurityEnvironment.Builder |
headers(Map<String,List<String>> headers)
Transport headers (such as HTTP headers, JMS headers).
|
SecurityEnvironment.Builder |
method(String method)
Method that is requested (such as GET/POST for http).
|
SecurityEnvironment.Builder |
path(String path)
Path that is requested (such as URI for http, without protocol, server and port).
|
SecurityEnvironment.Builder |
targetUri(URI uri)
Configure target URI.
|
SecurityEnvironment.Builder |
time(SecurityTime time)
Use the defined time to obtain current time.
|
SecurityEnvironment.Builder |
transport(String transport)
Transport we are implementing (such as http, https).
|
public static final String DEFAULT_TRANSPORT
public static final String DEFAULT_METHOD
public SecurityEnvironment build()
Builderbuild in interface Builder<SecurityEnvironment>public SecurityEnvironment.Builder addAttribute(String key, Object value)
key - name of the attributevalue - value of the attributepublic SecurityEnvironment.Builder headers(Map<String,List<String>> headers)
headers - header mappublic SecurityEnvironment.Builder header(String header, String value)
headers(Map) is called after
this method, it will remove changes by this method.header - header namevalue - header valuepublic SecurityEnvironment.Builder header(String header, List<String> values)
headers(Map) is called after
this method, it may remove changes by this method.header - header namevalues - header valuespublic SecurityEnvironment.Builder targetUri(URI uri)
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/44public SecurityEnvironment.Builder path(String path)
path - the pathpublic SecurityEnvironment.Builder method(String method)
method - the methodpublic SecurityEnvironment.Builder transport(String transport)
DEFAULT_TRANSPORT.transport - the transportpublic SecurityEnvironment.Builder time(SecurityTime time)
time - SecurityTime that allows for explicit values being set (e.g. for unit tests)Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.