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.PAYLOAD - The type of payload returned by the operation. Void if none.ATTRIBUTES - The type of attributes returned by the operation. Void if none.ERROR - The type of error thrown when an uncaught, unexpected and unknown error occurs.public class NonBlockingConnectorOperation<CONFIG extends ConnectorConfig,CONNECTION extends ConnectorConnection,SERVICE extends ConnectorService,PAYLOAD,ATTRIBUTES,ERROR extends Enum & org.mule.runtime.extension.api.error.ErrorTypeDefinition> extends Object
Non-blocking operations should not be the default as, normally, there is no non-blocking mechanism unless manually created.
| Modifier | Constructor and Description |
|---|---|
protected |
NonBlockingConnectorOperation(Class<SERVICE> serviceClass,
ERROR unexpectedErrorValue)
Default implementation of ConnectorOperation
NonBlockingConnectorOperation(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 |
NonBlockingConnectorOperation(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.
|
|
NonBlockingConnectorOperation(org.mule.commons.atlantic.lambda.function.TriFunction<CONFIG,CONNECTION,org.mule.runtime.extension.api.runtime.process.CompletionCallback<PAYLOAD,ATTRIBUTES>,SERVICE> serviceConstructorCall,
ERROR unexpectedErrorValue)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected <RESULT> org.mule.commons.atlantic.execution.builder.factory.InstanceExecutionBuilderFactory<SERVICE,RESULT> |
newExecutionBuilderFactory(CONFIG config,
CONNECTION connection,
org.mule.runtime.extension.api.runtime.process.CompletionCallback<PAYLOAD,ATTRIBUTES> completionCallback)
Factory method that allows the creation of an
InstanceExecutionBuilderFactory. |
public NonBlockingConnectorOperation(org.mule.commons.atlantic.lambda.function.TriFunction<CONFIG,CONNECTION,org.mule.runtime.extension.api.runtime.process.CompletionCallback<PAYLOAD,ATTRIBUTES>,SERVICE> serviceConstructorCall, ERROR unexpectedErrorValue)
ConnectorConfig as the first
parameter and ConnectorConnection as its second one and a CompletionCallback as its third.serviceConstructorCall - The constructor.unexpectedErrorValue - The error thrown when an uncaught, unexpected and unknown error occurs.protected NonBlockingConnectorOperation(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 NonBlockingConnectorOperation(Class<SERVICE> serviceClass, ERROR unexpectedErrorValue)
NonBlockingConnectorOperation(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, org.mule.runtime.extension.api.runtime.process.CompletionCallback<PAYLOAD,ATTRIBUTES> completionCallback)
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.