public Waiter<DescribeChannelRequest> channelStopped() {

        return new WaiterBuilder<DescribeChannelRequest, DescribeChannelResult>()
                .withSdkFunction(new DescribeChannelFunction(client))
                .withAcceptors(new ChannelStopped.IsIDLEMatcher(), new ChannelStopped.IsSTOPPINGMatcher(),
                        new HttpFailureStatusAcceptor(500, WaiterState.RETRY))
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(60), new FixedDelayStrategy(5)))
                .withExecutorService(executorService).build();
    }
Builds a ChannelStopped waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/waiters/AWSMediaLiveWaiters.java