Class DeliveryFuncResultBuilder


  • public class DeliveryFuncResultBuilder
    extends java.lang.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 Detail

      • DeliveryFuncResultBuilder

        public DeliveryFuncResultBuilder()
    • 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​(java.lang.String deliveryChannel)
        Set the maximum number of retry attempts.
        Parameters:
        deliveryChannel - the delivery channel name
        Returns:
        this builder
      • setMaxRetryAttempts

        public DeliveryFuncResultBuilder setMaxRetryAttempts​(java.lang.Integer maxRetryAttempts)
        Set the maximum number of retry attempts.
        Parameters:
        maxRetryAttempts - the maximum number of retry attempts
        Returns:
        this builder
      • setRetryIntervalsMins

        public DeliveryFuncResultBuilder setRetryIntervalsMins​(java.lang.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