org.eclipse.microprofile.fault.tolerance.tck.asyncretry.clientserver

## Class AsyncRetryClient

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.asyncretry.clientserver.AsyncRetryClient

    @RequestScoped
    public class AsyncRetryClient
    extends Object

A client to demonstrate the combination of the @Retry and @Asynchronous annotations.

Author:
  Bruno Baptista

### Constructor Summary

Constructors
Constructor and Description
`AsyncRetryClient()`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getCountInvocationsServA()`
`int` `getCountInvocationsServBFailException()`
`int` `getCountInvocationsServBFailExceptionally()`
`int` `getCountInvocationsServC()`
`int` `getCountInvocationsServD()`
`int` `getCountInvocationsServE()`
`int` `getCountInvocationsServF()`
`int` `getCountInvocationsServG()`
`int` `getCountInvocationsServH()`
`CompletionStage<String>` `serviceA()` Service will retry a method returning a CompletionStage and configured to always completeExceptionally.
`CompletionStage<String>` `serviceBFailException(CompletionStage future)` Service will retry a method returning a CompletionStage and configured to always completeExceptionally.
`CompletionStage<String>` `serviceBFailExceptionally(CompletionStage future)` Service will retry a method returning a CompletionStage and configured to always completeExceptionally.
`CompletionStage<String>` `serviceC()` Service will retry a method returning a CompletionStage and configured to completeExceptionally twice.
`CompletionStage<String>` `serviceD()` Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally twice.
`CompletionStage<String>` `serviceE()` Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally on all calls.
`CompletionStage<String>` `serviceF()` Service will retry a method returning a parallel execution of 2 CompletionStages.
`CompletionStage<String>` `serviceG()` Service will retry a method returning a parallel execution of 2 CompletionStages.
`CompletionStage<String>` `serviceH()` Service will retry a method returning CompletionStages but throwing an exception.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AsyncRetryClient

    public AsyncRetryClient()

### Method Detail

#### serviceA

    @Asynchronous
     @Retry(maxRetries=2)
    public CompletionStage<String> serviceA()

Service will retry a method returning a CompletionStage and configured to always completeExceptionally.

Returns:
  a `CompletionStage`

#### serviceBFailExceptionally

    @Retry(maxRetries=2)
    public CompletionStage<String> serviceBFailExceptionally(CompletionStage future)

Service will retry a method returning a CompletionStage and configured to always completeExceptionally.

Returns:
  a `CompletionStage`

#### serviceBFailException

    @Retry(maxRetries=2)
    public CompletionStage<String> serviceBFailException(CompletionStage future)

Service will retry a method returning a CompletionStage and configured to always completeExceptionally.

Returns:
  a `CompletionStage`

#### serviceC

    @Asynchronous
     @Retry(maxRetries=3)
    public CompletionStage<String> serviceC()

Service will retry a method returning a CompletionStage and configured to completeExceptionally twice.

Returns:
  a `CompletionStage`

#### serviceD

    @Asynchronous
     @Retry(maxRetries=3)
    public CompletionStage<String> serviceD()

Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally twice.

Returns:
  a `CompletionStage`

#### serviceE

    @Asynchronous
     @Retry(maxRetries=2)
    public CompletionStage<String> serviceE()

Service will retry a method returning a chained, running sequentially, CompletionStage configured to completeExceptionally on all calls.

Returns:
  a `CompletionStage`

#### serviceF

    @Asynchronous
     @Retry(maxRetries=3)
    public CompletionStage<String> serviceF()

Service will retry a method returning a parallel execution of 2 CompletionStages. One of them configured to always fail.

Returns:
  a `CompletionStage`

#### serviceG

    @Asynchronous
     @Retry(maxRetries=2)
    public CompletionStage<String> serviceG()

Service will retry a method returning a parallel execution of 2 CompletionStages. One of them configured to fail twice.

Returns:
  a `CompletionStage`

#### serviceH

    @Asynchronous
     @Retry(maxRetries=2)
    public CompletionStage<String> serviceH()

Service will retry a method returning CompletionStages but throwing an exception. fail twice.

Returns:
  a `CompletionStage`

#### getCountInvocationsServA

    public int getCountInvocationsServA()

#### getCountInvocationsServBFailException

    public int getCountInvocationsServBFailException()

#### getCountInvocationsServBFailExceptionally

    public int getCountInvocationsServBFailExceptionally()

#### getCountInvocationsServC

    public int getCountInvocationsServC()

#### getCountInvocationsServD

    public int getCountInvocationsServD()

#### getCountInvocationsServE

    public int getCountInvocationsServE()

#### getCountInvocationsServF

    public int getCountInvocationsServF()

#### getCountInvocationsServG

    public int getCountInvocationsServG()

#### getCountInvocationsServH

    public int getCountInvocationsServH()