Class HookProgressEvent<CallbackT>
java.lang.Object
software.amazon.cloudformation.proxy.hook.HookProgressEvent<CallbackT>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <CallbackT>
HookProgressEvent<CallbackT>static <CallbackT>
HookProgressEvent<CallbackT>Convenience method for constructing a SUCCESS responsestatic <CallbackT>
HookProgressEvent<CallbackT>defaultFailureHandler(Throwable e, HandlerErrorCode handlerErrorCode) Convenience method for constructing a FAILED responsestatic <CallbackT>
HookProgressEvent<CallbackT>defaultProgressHandler(CallbackT cxt, int delaySeconds) Convenience method for constructing a IN_PROGRESS responsestatic <CallbackT>
HookProgressEvent<CallbackT>failed(CallbackT cxt, HandlerErrorCode code, String message, String data) booleanbooleanisFailed()booleanbooleanstatic <CallbackT>
HookProgressEvent<CallbackT>
-
Constructor Details
-
HookProgressEvent
public HookProgressEvent()
-
-
Method Details
-
defaultFailureHandler
public static <CallbackT> HookProgressEvent<CallbackT> defaultFailureHandler(Throwable e, HandlerErrorCode handlerErrorCode) Convenience method for constructing a FAILED response- Type Parameters:
CallbackT- the type for the callback context- Parameters:
e- actual service exceptionhandlerErrorCode- error code to return to CloudFormation- Returns:
HookProgressEventfailed status code
-
failed
public static <CallbackT> HookProgressEvent<CallbackT> failed(CallbackT cxt, HandlerErrorCode code, String message, String data) -
defaultProgressHandler
public static <CallbackT> HookProgressEvent<CallbackT> defaultProgressHandler(CallbackT cxt, int delaySeconds) Convenience method for constructing a IN_PROGRESS response- Type Parameters:
CallbackT- The type for the callback context- Parameters:
cxt- callback contextdelaySeconds- how much time to wait before calling back the handler- Returns:
HookProgressEventwithHookStatus.IN_PROGRESS
-
progress
public static <CallbackT> HookProgressEvent<CallbackT> progress(CallbackT cxt, String message, String data, int delaySeconds) -
defaultCompleteHandler
Convenience method for constructing a SUCCESS response- Type Parameters:
CallbackT- The type for the callback context- Returns:
HookProgressEventwithHookStatus.SUCCESSindicating successful completion for operation
-
complete
public static <CallbackT> HookProgressEvent<CallbackT> complete(CallbackT cxt, String message, String data) -
onComplete
public HookProgressEvent<CallbackT> onComplete(Function<HookProgressEvent<CallbackT>, HookProgressEvent<CallbackT>> func) -
isFailed
public boolean isFailed() -
isInProgress
public boolean isInProgress() -
canContinueProgress
public boolean canContinueProgress() -
then
public HookProgressEvent<CallbackT> then(Function<HookProgressEvent<CallbackT>, HookProgressEvent<CallbackT>> func) -
isComplete
public boolean isComplete() -
isInProgressCallbackDelay
public boolean isInProgressCallbackDelay()
-