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

## Class AsyncTimeoutClient

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.asynctimeout.clientserver.AsyncTimeoutClient

    @RequestScoped
    public class AsyncTimeoutClient
    extends Object

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

Author:
  Neil Young

### Constructor Summary

Constructors
Constructor and Description
`AsyncTimeoutClient()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Future<Connection>` `serviceA()` serviceA is a slow running service that will take 5 seconds in normal operation.
`Future<Connection>` `serviceB()` serviceB is a fast running service that will take 0.5 seconds in normal operation.

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

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

### Constructor Detail

#### AsyncTimeoutClient

    public AsyncTimeoutClient()

### Method Detail

#### serviceA

    @Timeout(value=2000L)
     @Asynchronous
    public Future<Connection> serviceA()
                                                                     throws InterruptedException

serviceA is a slow running service that will take 5 seconds in normal operation. Here it is configured to time out after 2 seconds.

Returns:
  the result as a Future
Throws:
  `InterruptedException` - the interrupted exception

#### serviceB

    @Timeout(value=2000L)
     @Asynchronous
    public Future<Connection> serviceB()
                                                                     throws InterruptedException

serviceB is a fast running service that will take 0.5 seconds in normal operation. That is considerably quicker than its configured time out of 2 seconds.

Returns:
  the result as a Future
Throws:
  `InterruptedException` - the interrupted exception