C - the generic type of the generated connectionspublic class PlatformManagedOAuthConnectionProvider<C> extends Object implements OAuthConnectionProviderWrapper<C>, org.mule.runtime.api.connection.PoolingConnectionProvider<C>
OAuthConnectionProviderWrapper for OAuth connections managed on the Anypoint Platform| Constructor and Description |
|---|
PlatformManagedOAuthConnectionProvider(PlatformManagedOAuthConfig oauthConfig,
PlatformManagedOAuthHandler oauthHandler,
ReconnectionConfig reconnectionConfig,
org.mule.runtime.api.config.PoolingProfile poolingProfile) |
| Modifier and Type | Method and Description |
|---|---|
C |
connect() |
void |
disconnect(C connection) |
void |
dispose() |
org.mule.runtime.api.meta.model.connection.ConnectionManagementType |
getConnectionManagementType() |
org.mule.runtime.api.connection.ConnectionProvider<C> |
getDelegate() |
org.mule.runtime.extension.api.connectivity.oauth.OAuthGrantType |
getGrantType() |
Optional<String> |
getOwnerConfigName() |
Optional<org.mule.runtime.api.config.PoolingProfile> |
getPoolingProfile() |
Optional<ReconnectionConfig> |
getReconnectionConfig() |
String |
getResourceOwnerId() |
RetryPolicyTemplate |
getRetryPolicyTemplate() |
void |
initialise() |
void |
invalidate(String resourceOwnerId)
Invalidates the context of the given
resourceOwnerId |
void |
onBorrow(C connection) |
void |
onReturn(C connection) |
void |
refreshToken(String resourceOwnerId)
Executes a refresh token for the given
resourceOwnerId |
void |
start() |
void |
stop() |
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(C connection) |
public PlatformManagedOAuthConnectionProvider(PlatformManagedOAuthConfig oauthConfig, PlatformManagedOAuthHandler oauthHandler, ReconnectionConfig reconnectionConfig, org.mule.runtime.api.config.PoolingProfile poolingProfile)
public C connect() throws org.mule.runtime.api.connection.ConnectionException
connect in interface org.mule.runtime.api.connection.ConnectionProvider<C>org.mule.runtime.api.connection.ConnectionExceptionpublic org.mule.runtime.api.connection.ConnectionValidationResult validate(C connection)
validate in interface org.mule.runtime.api.connection.ConnectionProvider<C>public void disconnect(C connection)
disconnect in interface org.mule.runtime.api.connection.ConnectionProvider<C>public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void refreshToken(String resourceOwnerId)
OAuthConnectionProviderWrapperresourceOwnerIdrefreshToken in interface OAuthConnectionProviderWrapper<C>resourceOwnerId - a resource owner Idpublic void invalidate(String resourceOwnerId)
OAuthConnectionProviderWrapperresourceOwnerIdinvalidate in interface OAuthConnectionProviderWrapper<C>public org.mule.runtime.extension.api.connectivity.oauth.OAuthGrantType getGrantType()
getGrantType in interface OAuthConnectionProviderWrapper<C>OAuthGrantTypepublic Optional<org.mule.runtime.api.config.PoolingProfile> getPoolingProfile()
getPoolingProfile in interface org.mule.runtime.api.config.HasPoolingProfilepublic Optional<ReconnectionConfig> getReconnectionConfig()
getReconnectionConfig in interface HasReconnectionConfigpublic Optional<String> getOwnerConfigName()
getOwnerConfigName in interface ConnectionProviderWrapper<C>public String getResourceOwnerId()
getResourceOwnerId in interface OAuthConnectionProviderWrapper<C>public RetryPolicyTemplate getRetryPolicyTemplate()
getRetryPolicyTemplate in interface ConnectionProviderWrapper<C>public org.mule.runtime.api.connection.ConnectionProvider<C> getDelegate()
getDelegate in interface HasDelegate<C>public org.mule.runtime.api.meta.model.connection.ConnectionManagementType getConnectionManagementType()
getConnectionManagementType in interface ConnectionProviderWrapper<C>public void onBorrow(C connection)
onBorrow in interface org.mule.runtime.api.connection.PoolingListener<C>Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.