Interface CallChain.Stabilizer<RequestT,ResponseT,ClientT,ModelT,CallbackT extends StdCallbackContext>

Type Parameters:
RequestT - , the web service request that was made
ResponseT - the response or the fault (Exception) that needs to handled
ClientT - , the client that was used to invoke
ModelT - , the resource model object that we are currently working against
CallbackT - , the callback context that contains results
All Superinterfaces:
CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>, CallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT>
Enclosing interface:
CallChain

public static interface CallChain.Stabilizer<RequestT,ResponseT,ClientT,ModelT,CallbackT extends StdCallbackContext> extends CallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT>
This provides an optional stabilization function to be incorporate before we are done with the actual web service request. This is useful to ensure that the web request created a resource that takes time to be live or available before additional properties can be set on it. E.g. when one creates a Kinesis stream is takes some time before the stream is active to do other operations on it like set the retention period. private Boolean isStreamActive( CreateStreamRequest req, CreateStreamResponse res, ProxyClient<KinesisClient> client, ResourceModel model, CallbackContext cxt) { DescribeStreamRequest r = DescribeStreamRequest.builder().streamName(req.streamName()).build(); DescribeStreamResponse dr = client.injectCredentialsAndInvokeV2( r, client.client()::describeStream); StreamDescription description = dr.streamDescription(); model.setArn(description.streamARN()); return (description.streamStatus() == StreamStatus.ACTIVE); }