public static class VmcClients.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ApiClient |
build() |
VmcClients.Builder |
setAuthorizationUrl(java.lang.String authorizationUrl) |
VmcClients.Builder |
setBaseUrl(java.lang.String baseUrl) |
VmcClients.Builder |
setClientId(java.lang.String clientId) |
VmcClients.Builder |
setClientSecret(char[] clientSecret) |
VmcClients.Builder |
setOrgId(java.lang.String orgId) |
VmcClients.Builder |
setRefreshToken(char[] refreshToken) |
VmcClients.Builder |
useNonBlockingIo()
Invoking this method will result in the
ApiClient using
non-blocking (Java NIO) I/O. |
public VmcClients.Builder setRefreshToken(char[] refreshToken)
refreshToken
- the api token supplied to the authorization service
for issuing access tokenspublic VmcClients.Builder setClientId(java.lang.String clientId)
clientId
- the Client Identifier (AKA App ID) supplied to the authorization service
for issuing access tokens. clientId
works in combination with clientSecret
for
generating access token using client_credentials grant flow.
client_credentials flow is preferred over refresh-token (AKA api-token) flow.public VmcClients.Builder setClientSecret(char[] clientSecret)
clientSecret
- the Client Secret (AKA App Secret) supplied to the authorization service
for issuing access tokens. clientSecret
requires clientId
to be set in order to obtain
access token using client credentials grant flow.public VmcClients.Builder setOrgId(java.lang.String orgId)
orgId
- the Organization ID supplied to the authorization service
for issuing access tokens. orgId
works only with client credentials
flow. This is an optional parameter which is only needed if user wishes
to generate access token for a particular Organization. If orgId
is not set, access token is generated for default Organization of App.public VmcClients.Builder setBaseUrl(java.lang.String baseUrl)
baseUrl
- VMC's base URL; must not be null
. Default
value is public VmcClients.Builder useNonBlockingIo()
ApiClient
using
non-blocking (Java NIO) I/O.
By default the ApiClient
uses blocking I/O.
public VmcClients.Builder setAuthorizationUrl(java.lang.String authorizationUrl)
authorizationUrl
- VMC's authorization service URL; can be set
to null
to circumvent the authorization refresh
process. Default value is public ApiClient build()