use of org.mule.runtime.module.extension.internal.runtime.connectivity.oauth.OAuthConnectionProviderObjectBuilder in project mule by mulesoft.
the class ConnectionProviderObjectFactory method doGetObject.
@Override
public ConnectionProviderResolver doGetObject() throws Exception {
Callable<ResolverSet> callable = () -> getParametersResolver().getParametersAsHashedResolverSet(providerModel, muleContext);
ResolverSet resolverSet = withContextClassLoader(getClassLoader(extensionModel), callable);
ConnectionProviderObjectBuilder builder;
if (extensionModel.getModelProperty(SoapExtensionModelProperty.class).isPresent()) {
builder = new SoapConnectionProviderObjectBuilder(providerModel, resolverSet, poolingProfile, reconnectionConfig, extensionModel, muleContext);
} else if (providerModel.getModelProperty(OAuthModelProperty.class).isPresent()) {
builder = new OAuthConnectionProviderObjectBuilder(providerModel, resolverSet, poolingProfile, reconnectionConfig, oauthManager, extensionModel, muleContext);
} else {
builder = new DefaultConnectionProviderObjectBuilder(providerModel, resolverSet, poolingProfile, reconnectionConfig, extensionModel, muleContext);
}
return new ConnectionProviderResolver<>(builder, resolverSet, muleContext);
}
Aggregations