ResponseT - the response or the fault (Exception) that needs to
handledpublic static interface CallChain.Stabilizer<RequestT,ResponseT,ClientT,ModelT,CallbackT extends StdCallbackContext> extends CallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT>
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); } | Modifier and Type | Method and Description |
|---|---|
CallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT> |
stabilize(CallChain.Callback<RequestT,ResponseT,ClientT,ModelT,CallbackT,Boolean> callback) |
exceptFilter, exceptHandler, handleError, retryErrorFilterCallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT> stabilize(CallChain.Callback<RequestT,ResponseT,ClientT,ModelT,CallbackT,Boolean> callback)
callback, - the stabilize predicate that is called several times to
determine success.Copyright © 2019 Amazon Web Services, Inc. All Rights Reserved.