CONFIG - The config to be used.CONNECTION - The connection of the connector.SERVICE - The metadata service.public class ConnectorMetadataResolver<CONFIG extends ConnectorConfig,CONNECTION extends ConnectorConnection,SERVICE extends BlockingConnectorService,ERROR extends Enum<ERROR> & org.mule.runtime.extension.api.error.ErrorTypeDefinition<ERROR>> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ConnectorMetadataResolver(org.mule.commons.atlantic.lambda.function.BiFunction<CONFIG,CONNECTION,SERVICE> serviceConstructor,
ERROR unknownErrorTypeDefinition)
Default constructor.
|
protected |
ConnectorMetadataResolver(Class<SERVICE> serviceClass,
ERROR unknownErrorTypeDefinition)
Constructor that receives only the interface of the
BlockingConnectorService to use. |
protected |
ConnectorMetadataResolver(Class<SERVICE> serviceClass,
Function<Class<SERVICE>,Class<? extends SERVICE>> transformer,
ERROR unknownErrorTypeDefinition)
Constructor that receives the interface of the
BlockingConnectorService to use and a transformer Function that converts that class into an implementation one. |
| Modifier and Type | Method and Description |
|---|---|
protected <RESULT> org.mule.commons.atlantic.execution.builder.factory.InstanceExecutionBuilderFactory<SERVICE,RESULT> |
newExecutionBuilderFactory(org.mule.runtime.api.metadata.MetadataContext metadataContext)
Creates and returns an
InstanceExecutionBuilderFactory for an instance of the service used by this resolver based on the information available on the MetadataContext. |
protected ConnectorMetadataResolver(org.mule.commons.atlantic.lambda.function.BiFunction<CONFIG,CONNECTION,SERVICE> serviceConstructor, ERROR unknownErrorTypeDefinition)
serviceConstructor - The constructor of the service implementation.unknownErrorTypeDefinition - The error to throw when an unexpected error occurs.protected ConnectorMetadataResolver(Class<SERVICE> serviceClass, ERROR unknownErrorTypeDefinition)
BlockingConnectorService to use. It assumes that there's an implementation named the same but with Impl at the end (i.e. MyService would have MyServiceImpl).serviceClass - The interface of the service.unknownErrorTypeDefinition - The error to throw when an unexpected error occurs.protected ConnectorMetadataResolver(Class<SERVICE> serviceClass, Function<Class<SERVICE>,Class<? extends SERVICE>> transformer, ERROR unknownErrorTypeDefinition)
BlockingConnectorService to use and a transformer Function that converts that class into an implementation one.serviceClass - The interface of the service.transformer - The transforming function.unknownErrorTypeDefinition - The error to throw when an unexpected error occurs.protected <RESULT> org.mule.commons.atlantic.execution.builder.factory.InstanceExecutionBuilderFactory<SERVICE,RESULT> newExecutionBuilderFactory(org.mule.runtime.api.metadata.MetadataContext metadataContext)
InstanceExecutionBuilderFactory for an instance of the service used by this resolver based on the information available on the MetadataContext.RESULT - The type of object that will be returned by the execution of the service.metadataContext - The context of the metadata.Copyright © 2018. All rights reserved.