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 TypeMethodDescriptiondefault IdAMessageType
connectOrThrow
(IdAClientConnectionParameters parameters) CallHBClientType.connect(HBConnectionParametersType)
but throw an exception if the result is anIdAResponseError
.default String
default <R extends IdAResponseType>
RsendAndWaitOrThrow
(IdACommandType<R> message, Duration timeout) CallHBIOOperationsType.sendAndWait(HBMessageType, Duration)
but throw an exception if the result is anIdAResponseError
.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 CallHBClientType.connect(HBConnectionParametersType)
but throw an exception if the result is anIdAResponseError
.- Parameters:
parameters
- The connection parameters- Returns:
- The success message
- Throws:
IdAClientException
- On errorsInterruptedException
- On interruption
-
sendAndWaitOrThrow
default <R extends IdAResponseType> R sendAndWaitOrThrow(IdACommandType<R> message, Duration timeout) throws IdAClientException, InterruptedException, TimeoutException CallHBIOOperationsType.sendAndWait(HBMessageType, Duration)
but throw an exception if the result is anIdAResponseError
.- Type Parameters:
R
- The type of results- Parameters:
message
- The messagetimeout
- The timeout- Returns:
- The result
- Throws:
IdAClientException
- On errorsInterruptedException
- On interruptionTimeoutException
- On timeouts
-
description
- Specified by:
description
in interfacecom.io7m.repetoir.core.RPServiceType
-