Class ProgressEvent<ResourceT,​CallbackT>

java.lang.Object
software.amazon.cloudformation.proxy.ProgressEvent<ResourceT,​CallbackT>

public class ProgressEvent<ResourceT,​CallbackT>
extends java.lang.Object
  • Constructor Details

    • ProgressEvent

      public ProgressEvent()
  • Method Details

    • defaultFailureHandler

      public static <ResourceT,​ CallbackT> ProgressEvent<ResourceT,​CallbackT> defaultFailureHandler​(java.lang.Throwable e, HandlerErrorCode handlerErrorCode)
      Convenience method for constructing a FAILED response
      Type Parameters:
      ResourceT - The type for the resource model
      CallbackT - the type for the callback context
      Parameters:
      e - actual service exception
      handlerErrorCode - error code to return to CloudFormation
      Returns:
      ProgressEvent failed status code
    • failed

      public static <ResourceT,​ CallbackT> ProgressEvent<ResourceT,​CallbackT> failed​(ResourceT model, CallbackT cxt, HandlerErrorCode code, java.lang.String message)
    • defaultInProgressHandler

      public static <ResourceT,​ CallbackT> ProgressEvent<ResourceT,​CallbackT> defaultInProgressHandler​(CallbackT callbackContext, int callbackDelaySeconds, ResourceT resourceModel)
      Convenience method for constructing a IN_PROGRESS response
      Type Parameters:
      ResourceT - The type for the resource model
      CallbackT - the type for the callback context
      Parameters:
      callbackContext - callback context
      callbackDelaySeconds - how much time to wait before calling back the handler
      resourceModel - the actual resource model state
      Returns:
      ProgressEvent with OperationStatus.IN_PROGRESS with delay
    • progress

      public static <ResourceT,​ CallbackT> ProgressEvent<ResourceT,​CallbackT> progress​(ResourceT model, CallbackT cxt)
    • defaultSuccessHandler

      public static <ResourceT,​ CallbackT> ProgressEvent<ResourceT,​CallbackT> defaultSuccessHandler​(ResourceT resourceModel)
      Convenience method for constructing a SUCCESS response
      Type Parameters:
      ResourceT - The type for the resource model
      CallbackT - the type for the callback context
      Parameters:
      resourceModel - the current resource model state
      Returns:
      ProgressEvent with OperationStatus.SUCCESS indicating successful completion for operation
    • success

      public static <ResourceT,​ CallbackT> ProgressEvent<ResourceT,​CallbackT> success​(ResourceT model, CallbackT cxt)
    • onSuccess

      public ProgressEvent<ResourceT,​CallbackT> onSuccess​(java.util.function.Function<ProgressEvent<ResourceT,​CallbackT>,​ProgressEvent<ResourceT,​CallbackT>> func)
    • isFailed

      public boolean isFailed()
    • isInProgress

      public boolean isInProgress()
    • canContinueProgress

      public boolean canContinueProgress()
    • then

      public ProgressEvent<ResourceT,​CallbackT> then​(java.util.function.Function<ProgressEvent<ResourceT,​CallbackT>,​ProgressEvent<ResourceT,​CallbackT>> func)
    • isSuccess

      public boolean isSuccess()
    • isInProgressCallbackDelay

      public boolean isInProgressCallbackDelay()