/** * Creates a new waiter using the given strategies. If any of the args are * null, the default strategy listed in this class will be used. * * @param terminationStrategy * The termination strategy. * @param delayStrategy * The delay strategy. * @return A new waiter instance. */ public static BmcGenericWaiter newWaiter( @Nullable TerminationStrategy terminationStrategy, @Nullable DelayStrategy delayStrategy) { TerminationStrategy terminationStrategyToUse = terminationStrategy != null ? terminationStrategy : DEFAULT_POLLING_TERMINATION_STRATEGY; DelayStrategy delayStrategyToUse = delayStrategy != null ? delayStrategy : DEFAULT_POLLING_DELAY_STRATEGY; return new BmcGenericWaiter(terminationStrategyToUse, delayStrategyToUse); }