public class ObjectStoreClientStore extends AbstractObjectStoreBacked<Client> implements ClientStore, ClientRegistration
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENTS_PARTITION |
| Constructor and Description |
|---|
ObjectStoreClientStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClient(Client client,
boolean failIfPresent)
Add a new client.
|
Client |
getClientById(String clientId)
Returns a client based on the provided client Id.
|
Client |
getClientById(String clientId,
String clientSecret)
Returns a client based on the provided client Id.
|
org.mule.runtime.api.store.ObjectStore |
getClientObjectStore() |
void |
removeClient(String clientId)
Removes a registered client.
|
void |
removeClient(String clientId,
String clientSecret)
Removes a registered client.
|
void |
setKeyFormatter(KeyFormatter formatter) |
void |
setObjectStore(org.mule.runtime.api.store.ObjectStore clientObjectStore) |
getFromObjectStore, putInObjectStore, putInObjectStore, removeFromObjectStorepublic static final String CLIENTS_PARTITION
public Client getClientById(String clientId) throws NoSuchClientException
ClientStoregetClientById in interface ClientStoreclientId - The clientIdNoSuchClientExceptionpublic Client getClientById(String clientId, String clientSecret) throws NoSuchClientException
ClientStoregetClientById in interface ClientStoreclientId - The clientIdclientSecret - The clientSecretNoSuchClientExceptionpublic void addClient(Client client, boolean failIfPresent) throws ClientAlreadyExistsException
ClientRegistrationaddClient in interface ClientRegistrationClientAlreadyExistsException - if failIfPresent is set to true and a client with the same clientId
is in the storepublic void removeClient(String clientId)
ClientRegistrationremoveClient in interface ClientRegistrationclientId - The client Id.public void removeClient(String clientId, String clientSecret) throws NoSuchClientException
ClientRegistrationremoveClient in interface ClientRegistrationclientId - The client Id.clientSecret - The client secret.NoSuchClientException - If client does not exist a NoSuchClientException
is thrown.public void setObjectStore(org.mule.runtime.api.store.ObjectStore clientObjectStore)
public void setKeyFormatter(KeyFormatter formatter)
public org.mule.runtime.api.store.ObjectStore getClientObjectStore()
Copyright © 2024 MuleSoft, Inc.. All rights reserved.