# Interface IdAClientType

All Superinterfaces:
  `AutoCloseable, com.io7m.hibiscus.api.HBClientCloseableType<IdAClientException>, com.io7m.hibiscus.api.HBClientType<IdAMessageType, IdAClientConnectionParameters, IdAClientException>, com.io7m.hibiscus.api.HBIOOperationsType<IdAMessageType, IdAClientException>, com.io7m.repetoir.core.RPServiceType`

All Known Implementing Classes:
  `IdAClient`

public interface IdAClientType extends com.io7m.hibiscus.api.HBClientType<IdAMessageType, IdAClientConnectionParameters, IdAClientException>, com.io7m.repetoir.core.RPServiceType
The type of synchronous clients.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default IdAMessageType`
  `connectOrThrow(IdAClientConnectionParameters parameters)`
  Call `HBClientType.connect(HBConnectionParametersType)` but throw an exception if the result is an `IdAResponseError`.
  `default String`
  `description()`
  `default <R extends IdAResponseType>
  R`
  `sendAndWaitOrThrow(IdACommandType<R> message, Duration timeout)`
  Call `HBIOOperationsType.sendAndWait(HBMessageType, Duration)` but throw an exception if the result is an `IdAResponseError`.

  ### Methods inherited from interface com.io7m.hibiscus.api.HBClientCloseableType

  `close, isClosed`

  ### Methods inherited from interface com.io7m.hibiscus.api.HBClientType

  `connect, disconnect, state, stateNow`

  ### Methods inherited from interface com.io7m.hibiscus.api.HBIOOperationsType

  `receive, send, sendAndForget, sendAndWait`

- ## Method Details

  - ### connectOrThrow

    default IdAMessageType connectOrThrow(IdAClientConnectionParameters parameters) throws IdAClientException, InterruptedException
    Call `HBClientType.connect(HBConnectionParametersType)` but throw an exception if the result is an `IdAResponseError`.
    Parameters:
      `parameters` - The connection parameters
    Returns:
      The success message
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption

  - ### sendAndWaitOrThrow

    default <R extends IdAResponseType> R sendAndWaitOrThrow(IdACommandType<R> message, Duration timeout) throws IdAClientException, InterruptedException, TimeoutException
    Call `HBIOOperationsType.sendAndWait(HBMessageType, Duration)` but throw an exception if the result is an `IdAResponseError`.
    Type Parameters:
      `R` - The type of results
    Parameters:
      `message` - The message
      `timeout` - The timeout
    Returns:
      The result
    Throws:
      `IdAClientException` - On errors
      `InterruptedException` - On interruption
      `TimeoutException` - On timeouts

  - ### description

    default String description()
    Specified by:
      `description` in interface `com.io7m.repetoir.core.RPServiceType`