Search in sources :

Example 1 with OAuthConnectionProviderObjectBuilder

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);
}
Also used : ResolverSet(org.mule.runtime.module.extension.internal.runtime.resolver.ResolverSet) SoapConnectionProviderObjectBuilder(org.mule.runtime.module.extension.soap.internal.runtime.connection.SoapConnectionProviderObjectBuilder) DefaultConnectionProviderObjectBuilder(org.mule.runtime.module.extension.internal.runtime.config.DefaultConnectionProviderObjectBuilder) OAuthConnectionProviderObjectBuilder(org.mule.runtime.module.extension.internal.runtime.connectivity.oauth.OAuthConnectionProviderObjectBuilder) ConnectionProviderObjectBuilder(org.mule.runtime.module.extension.internal.runtime.config.ConnectionProviderObjectBuilder) SoapConnectionProviderObjectBuilder(org.mule.runtime.module.extension.soap.internal.runtime.connection.SoapConnectionProviderObjectBuilder) OAuthConnectionProviderObjectBuilder(org.mule.runtime.module.extension.internal.runtime.connectivity.oauth.OAuthConnectionProviderObjectBuilder) ConnectionProviderResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ConnectionProviderResolver) SoapExtensionModelProperty(org.mule.runtime.module.extension.soap.internal.loader.property.SoapExtensionModelProperty) DefaultConnectionProviderObjectBuilder(org.mule.runtime.module.extension.internal.runtime.config.DefaultConnectionProviderObjectBuilder)

Aggregations

ConnectionProviderObjectBuilder (org.mule.runtime.module.extension.internal.runtime.config.ConnectionProviderObjectBuilder)1 DefaultConnectionProviderObjectBuilder (org.mule.runtime.module.extension.internal.runtime.config.DefaultConnectionProviderObjectBuilder)1 OAuthConnectionProviderObjectBuilder (org.mule.runtime.module.extension.internal.runtime.connectivity.oauth.OAuthConnectionProviderObjectBuilder)1 ConnectionProviderResolver (org.mule.runtime.module.extension.internal.runtime.resolver.ConnectionProviderResolver)1 ResolverSet (org.mule.runtime.module.extension.internal.runtime.resolver.ResolverSet)1 SoapExtensionModelProperty (org.mule.runtime.module.extension.soap.internal.loader.property.SoapExtensionModelProperty)1 SoapConnectionProviderObjectBuilder (org.mule.runtime.module.extension.soap.internal.runtime.connection.SoapConnectionProviderObjectBuilder)1