Package com.avoka.tm.func
Class DeliveryFuncResultBuilder
- java.lang.Object
-
- com.avoka.tm.func.DeliveryFuncResultBuilder
-
public class DeliveryFuncResultBuilder extends Object
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
Constructors Constructor Description DeliveryFuncResultBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeliveryFuncResult
build()
Return the delivery function resultDeliveryFuncResultBuilder
setDeliveryChannel(String deliveryChannel)
Set the maximum number of retry attempts.DeliveryFuncResultBuilder
setMaxRetryAttempts(Integer maxRetryAttempts)
Set the maximum number of retry attempts.DeliveryFuncResultBuilder
setRetryIntervalsMins(Integer retryIntervalsMins)
Set the delivery retry interval in minutes.DeliveryFuncResultBuilder
setStatusCompleted()
Set the delivery result status to be 'Completed'.DeliveryFuncResultBuilder
setStatusError()
Set the delivery result status to be 'Error'.DeliveryFuncResultBuilder
setStatusInProgress()
Set the delivery result status to be 'In Progress'.
-
-
-
Method Detail
-
setStatusCompleted
public DeliveryFuncResultBuilder setStatusCompleted()
Set the delivery result status to be 'Completed'.- Returns:
- this builder
-
setStatusError
public DeliveryFuncResultBuilder setStatusError()
Set the delivery result status to be 'Error'.- Returns:
- this builder
-
setStatusInProgress
public DeliveryFuncResultBuilder setStatusInProgress()
Set the delivery result status to be 'In Progress'.- Returns:
- this builder
-
setDeliveryChannel
public DeliveryFuncResultBuilder setDeliveryChannel(String deliveryChannel)
Set the maximum number of retry attempts.- Parameters:
deliveryChannel
- the delivery channel name- Returns:
- this builder
-
setMaxRetryAttempts
public DeliveryFuncResultBuilder setMaxRetryAttempts(Integer maxRetryAttempts)
Set the maximum number of retry attempts.- Parameters:
maxRetryAttempts
- the maximum number of retry attempts- Returns:
- this builder
-
setRetryIntervalsMins
public DeliveryFuncResultBuilder setRetryIntervalsMins(Integer retryIntervalsMins)
Set the delivery retry interval in minutes.- Parameters:
retryIntervalsMins
- the retry interval in minutes- Returns:
- this builder
-
build
public DeliveryFuncResult build()
Return the delivery function result- Returns:
- the delivery function result
-
-