public abstract class AbstractClient extends Object implements Client
Client implementation.
This is a convenience mechanism to eliminate the constant need to call client.getDataStore() every
time one needs to instantiate or look up a Resource.| Constructor and Description |
|---|
AbstractClient(ClientCredentialsResolver clientCredentialsResolver,
BaseUrlResolver baseUrlResolver,
Proxy proxy,
CacheManager cacheManager,
AuthenticationScheme authenticationScheme,
RequestAuthenticatorFactory requestAuthenticatorFactory,
int connectionTimeout)
Instantiates a new Client instance that will communicate with the Okta REST API.
|
| Modifier and Type | Method and Description |
|---|---|
protected InternalDataStore |
createDataStore(RequestExecutor requestExecutor,
BaseUrlResolver baseUrlResolver,
ClientCredentialsResolver clientCredentialsResolver,
CacheManager cacheManager) |
protected RequestExecutor |
createRequestExecutor(ClientCredentials clientCredentials,
Proxy proxy,
AuthenticationScheme authenticationScheme,
RequestAuthenticatorFactory requestAuthenticatorFactory,
int connectionTimeout) |
CacheManager |
getCacheManager() |
ClientCredentials |
getClientCredentials() |
InternalDataStore |
getDataStore() |
<T extends Resource> |
getResource(String href,
Class<T> clazz)
Delegates to the internal
dataStore instance. |
<T extends Resource> |
instantiate(Class<T> clazz)
Delegates to the internal
dataStore instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateApplication, createApplication, createGroup, createRule, createSession, createUser, createUser, getApplication, getApplication, getGroup, getGroup, getLogs, getLogs, getRule, getSession, getUser, listApplications, listApplications, listGroups, listGroups, listRules, listUsers, listUserspublic AbstractClient(ClientCredentialsResolver clientCredentialsResolver, BaseUrlResolver baseUrlResolver, Proxy proxy, CacheManager cacheManager, AuthenticationScheme authenticationScheme, RequestAuthenticatorFactory requestAuthenticatorFactory, int connectionTimeout)
clientCredentialsResolver - Okta API Key resolverbaseUrlResolver - Okta base URL resolverproxy - the HTTP proxy to be used when communicating with the Okta API server (can be
null)cacheManager - the CacheManager that should be used to cache
Okta REST resources (can be null)authenticationScheme - the HTTP authentication scheme to be used when communicating with the Okta API
server (can be null)requestAuthenticatorFactory - factory used to handle creating autentication requestsconnectionTimeout - connection timeout in secondsprotected InternalDataStore createDataStore(RequestExecutor requestExecutor, BaseUrlResolver baseUrlResolver, ClientCredentialsResolver clientCredentialsResolver, CacheManager cacheManager)
public ClientCredentials getClientCredentials()
getClientCredentials in interface DataStorepublic CacheManager getCacheManager()
getCacheManager in interface DataStorepublic InternalDataStore getDataStore()
getDataStore in interface Clientprotected RequestExecutor createRequestExecutor(ClientCredentials clientCredentials, Proxy proxy, AuthenticationScheme authenticationScheme, RequestAuthenticatorFactory requestAuthenticatorFactory, int connectionTimeout)
public <T extends Resource> T instantiate(Class<T> clazz)
dataStore instance. This is a convenience mechanism to eliminate the constant
need to call client.getDataStore() every time one needs to instantiate Resource.instantiate in interface DataStoreT - the Resource sub-typeclazz - the Resource class to instantiate.public <T extends Resource> T getResource(String href, Class<T> clazz)
dataStore instance. This is a convenience mechanism to eliminate the constant
need to call client.getDataStore() every time one needs to look up a Resource.getResource in interface DataStoreT - type parameter indicating the returned value is a Resource instance.href - the resource URL of the resource to retrieveclazz - the Resource sub-interface to instantiatehref URL.Copyright © 2017 Okta. All rights reserved.