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

## Class TimeoutClient

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.timeout.clientserver.TimeoutClient

    @RequestScoped
    public class TimeoutClient
    extends Object

A client to test Timeouts

Author:
  Neil Young

### Constructor Summary

Constructors
Constructor and Description
`TimeoutClient()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Connection` `serviceA(long timeToSleep)` serviceA uses the default Fault Tolerance timeout of 1 second.
`Connection` `serviceB(long timeToSleep)` serviceB specifies a Timeout longer than the default, at 2 seconds
`Connection` `serviceC(long timeToSleep)` serviceC specifies a Timeout shorter than the default, at .5 seconds
`Connection` `serviceD(long timeToSleepInMillis)` serviceD specifies a Timeout longer than the default, at 2 seconds.

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

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

### Constructor Detail

#### TimeoutClient

    public TimeoutClient()

### Method Detail

#### serviceA

    @Timeout
    public Connection serviceA(long timeToSleep)

serviceA uses the default Fault Tolerance timeout of 1 second.

Parameters:
  `timeToSleep` - How long should the execution take in millis
Returns:
  null or exception is raised

#### serviceB

    @Timeout(value=2000L)
    public Connection serviceB(long timeToSleep)

serviceB specifies a Timeout longer than the default, at 2 seconds

Parameters:
  `timeToSleep` - How long should the execution take in millis
Returns:
  null or exception is raised

#### serviceC

    @Timeout(value=500L)
    public Connection serviceC(long timeToSleep)

serviceC specifies a Timeout shorter than the default, at .5 seconds

Parameters:
  `timeToSleep` - How long should the execution take in millis
Returns:
  null or exception is raised

#### serviceD

    @Timeout(value=2L,
             unit=SECONDS)
    public Connection serviceD(long timeToSleepInMillis)

serviceD specifies a Timeout longer than the default, at 2 seconds.

Parameters:
  `timeToSleepInMillis` - How long should the execution take in millis
Returns:
  null or exception is raised