Package com.avoka.tm.func
Class DeliveryFuncResultBuilder
java.lang.Object
com.avoka.tm.func.DeliveryFuncResultBuilder
Provides a DeliveryFuncResult builder class.
Delivery Example
The Fluent Delivery Function below illustrates how to create a 'Completed' status delivery function result.
import com.avoka.tm.func.* import com.avoka.tm.util.* import com.avoka.tm.vo.* class DeliveryFunction { // Injected at runtime public Logger logger // Perform Delivery Function call DeliveryFuncResult invoke(SvcDef svcDef, FuncParam param) { // TODO: add delivery code return new DeliveryFuncResultBuilder() .setStatusCompleted() .build(); } }
- Since:
- 17.10.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Return the delivery function resultsetDeliveryChannel
(String deliveryChannel) Set the maximum number of retry attempts.setMaxRetryAttempts
(Integer maxRetryAttempts) Set the maximum number of retry attempts.setRetryIntervalsMins
(Integer retryIntervalsMins) Set the delivery retry interval in minutes.Set the delivery result status to be 'Completed'.Set the delivery result status to be 'Error'.Set the delivery result status to be 'In Progress'.
-
Constructor Details
-
DeliveryFuncResultBuilder
public DeliveryFuncResultBuilder()
-
-
Method Details
-
setStatusCompleted
Set the delivery result status to be 'Completed'.- Returns:
- this builder
-
setStatusError
Set the delivery result status to be 'Error'.- Returns:
- this builder
-
setStatusInProgress
Set the delivery result status to be 'In Progress'.- Returns:
- this builder
-
setDeliveryChannel
Set the maximum number of retry attempts.- Parameters:
deliveryChannel
- the delivery channel name- Returns:
- this builder
-
setMaxRetryAttempts
Set the maximum number of retry attempts.- Parameters:
maxRetryAttempts
- the maximum number of retry attempts- Returns:
- this builder
-
setRetryIntervalsMins
Set the delivery retry interval in minutes.- Parameters:
retryIntervalsMins
- the retry interval in minutes- Returns:
- this builder
-
build
Return the delivery function result- Returns:
- the delivery function result
-