CONFIG - The configuration type of the operation. Must implement ConnectorConfig.CONNECTION - The connection type of the operation. Must implement ConnectorConnection.SERVICE - The service type of the operation. Must extend ConnectorService.ERROR - The type of error thrown when an uncaught, unexpected and unknown error occurs.public class ConnectorOperation<CONFIG extends ConnectorConfig,CONNECTION extends ConnectorConnection,SERVICE extends ConnectorService,ERROR extends Enum & org.mule.runtime.extension.api.error.ErrorTypeDefinition> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ConnectorOperation(org.mule.commons.atlantic.lambda.function.BiFunction<CONFIG,CONNECTION,SERVICE> serviceConstructorCall,
ERROR unexpectedErrorValue)
Default constructor.
|
protected |
ConnectorOperation(Class<SERVICE> serviceClass,
ERROR unexpectedErrorValue)
Default implementation of ConnectorOperation
ConnectorOperation(Class, Function, Enum) that defines a
regular function that converts the class of the interface to the class of the implementation by adding an Impl to
its name. |
protected |
ConnectorOperation(Class<SERVICE> serviceClass,
Function<Class<SERVICE>,Class<? extends SERVICE>> transformer,
ERROR unexpectedErrorValue)
Constructor that allows for the custom specification of how the implementation of the passed service class should
be retrieved.
|
| Modifier and Type | Method and Description |
|---|---|
protected <RESULT> org.mule.commons.atlantic.execution.builder.factory.InstanceExecutionBuilderFactory<SERVICE,RESULT> |
newExecutionBuilderFactory(CONFIG config,
CONNECTION connection)
Factory method that allows the creation of an
InstanceExecutionBuilderFactory. |
protected ConnectorOperation(org.mule.commons.atlantic.lambda.function.BiFunction<CONFIG,CONNECTION,SERVICE> serviceConstructorCall, ERROR unexpectedErrorValue)
ConnectorConfig as the first
parameter and ConnectorConnection as its second one.serviceConstructorCall - The constructor.unexpectedErrorValue - The error thrown when an uncaught, unexpected and unknown error occurs.protected ConnectorOperation(Class<SERVICE> serviceClass, Function<Class<SERVICE>,Class<? extends SERVICE>> transformer, ERROR unexpectedErrorValue)
serviceClass - This should be the class of the interface.transformer - This is the function that converts from the class of the interface to the class of
the implementation.
The implementation should have a 2 parameters constructor that takes a child of
ConnectorConfig as the first parameter and ConnectorConnection as its
second one.unexpectedErrorValue - The error thrown when an uncaught, unexpected and unknown error occurs.protected ConnectorOperation(Class<SERVICE> serviceClass, ERROR unexpectedErrorValue)
ConnectorOperation(Class, Function, Enum) that defines a
regular function that converts the class of the interface to the class of the implementation by adding an Impl to
its name.serviceClass - This should be the class of the interface.unexpectedErrorValue - The error thrown when an uncaught, unexpected and unknown error occurs.protected <RESULT> org.mule.commons.atlantic.execution.builder.factory.InstanceExecutionBuilderFactory<SERVICE,RESULT> newExecutionBuilderFactory(CONFIG config, CONNECTION connection)
InstanceExecutionBuilderFactory. This class will allow the
execution of all the methods on the service interface declared as a generic on this class and provide them as a
fluent executor.RESULT - The type of result expected from the execution.config - The config of the operation.connection - The connection of the operation.Copyright © 2018. All rights reserved.