/** * Fetches the current state of the resource based on the acceptor it matches * * @return Current state of the resource * @throws Exception */ private WaiterState getCurrentState() throws AmazonServiceException { try { return acceptor.accepts(sdkFunction.apply(request)); } catch (AmazonServiceException amazonServiceException) { return acceptor.accepts(amazonServiceException); } }
/** * Constructs a new waiter with all the parameters defined * in the WaiterExecutionBuilder * * @param waiterExecutionBuilder Contains all the parameters required to construct a * new waiter */ public WaiterExecution(WaiterExecutionBuilder<Input, Output> waiterExecutionBuilder) { this.sdkFunction = ValidationUtils.assertNotNull(waiterExecutionBuilder.getSdkFunction(), "sdkFunction"); this.request = ValidationUtils.assertNotNull(waiterExecutionBuilder.getRequest(), "request"); this.acceptor = new CompositeAcceptor<Output>(ValidationUtils.assertNotNull(waiterExecutionBuilder.getAcceptorsList(), "acceptors")); this.pollingStrategy = ValidationUtils.assertNotNull(waiterExecutionBuilder.getPollingStrategy(), "pollingStrategy"); }
/** * Constructs a new waiter with all the parameters defined * in the WaiterExecutionBuilder * * @param waiterExecutionBuilder Contains all the parameters required to construct a * new waiter */ public WaiterExecution(WaiterExecutionBuilder<Input, Output> waiterExecutionBuilder) { this.sdkFunction = ValidationUtils.assertNotNull(waiterExecutionBuilder.getSdkFunction(), "sdkFunction"); this.request = ValidationUtils.assertNotNull(waiterExecutionBuilder.getRequest(), "request"); this.acceptor = new CompositeAcceptor<Output>(ValidationUtils.assertNotNull(waiterExecutionBuilder.getAcceptorsList(), "acceptors")); this.pollingStrategy = ValidationUtils.assertNotNull(waiterExecutionBuilder.getPollingStrategy(), "pollingStrategy"); }
/** * Fetches the current state of the resource based on the acceptor it matches * * @return Current state of the resource * @throws Exception */ private WaiterState getCurrentState() throws AmazonServiceException { try { return acceptor.accepts(sdkFunction.apply(request)); } catch (AmazonServiceException amazonServiceException) { return acceptor.accepts(amazonServiceException); } }
/** * Constructs a new waiter with all the parameters defined * in the WaiterExecutionBuilder * * @param waiterExecutionBuilder Contains all the parameters required to construct a * new waiter */ public WaiterExecution(WaiterExecutionBuilder<Input, Output> waiterExecutionBuilder) { this.sdkFunction = ValidationUtils.assertNotNull(waiterExecutionBuilder.getSdkFunction(), "sdkFunction"); this.request = ValidationUtils.assertNotNull(waiterExecutionBuilder.getRequest(), "request"); this.acceptor = new CompositeAcceptor<Output>(ValidationUtils.assertNotNull(waiterExecutionBuilder.getAcceptorsList(), "acceptors")); this.pollingStrategy = ValidationUtils.assertNotNull(waiterExecutionBuilder.getPollingStrategy(), "pollingStrategy"); }
/** * Fetches the current state of the resource based on the acceptor it matches * * @return Current state of the resource * @throws Exception */ private WaiterState getCurrentState() throws AmazonServiceException { try { return acceptor.accepts(sdkFunction.apply(request)); } catch (AmazonServiceException amazonServiceException) { return acceptor.accepts(amazonServiceException); } }