Package com.io7m.idstore.user_client.api
Interface IdUClientType
- All Superinterfaces:
AutoCloseable
,com.io7m.hibiscus.api.HBClientCloseableType<IdUClientException>
,com.io7m.hibiscus.api.HBClientType<IdUMessageType,
,IdUClientConnectionParameters, IdUClientException> com.io7m.hibiscus.api.HBIOOperationsType<IdUMessageType,
IdUClientException>
- All Known Implementing Classes:
IdUClient
public interface IdUClientType
extends com.io7m.hibiscus.api.HBClientType<IdUMessageType,IdUClientConnectionParameters,IdUClientException>
The type of clients.
-
Method Summary
Modifier and TypeMethodDescriptiondefault IdUMessageType
connectOrThrow
(IdUClientConnectionParameters parameters) CallHBClientType.connect(HBConnectionParametersType)
but throw an exception if the result is anIdUResponseError
.default <R extends IdUResponseType>
RsendAndWaitOrThrow
(IdUCommandType<R> message, Duration timeout) CallHBIOOperationsType.sendAndWait(HBMessageType, Duration)
but throw an exception if the result is anIdUResponseError
.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 IdUMessageType connectOrThrow(IdUClientConnectionParameters parameters) throws IdUClientException, InterruptedException CallHBClientType.connect(HBConnectionParametersType)
but throw an exception if the result is anIdUResponseError
.- Parameters:
parameters
- The connection parameters- Returns:
- The success message
- Throws:
IdUClientException
- On errorsInterruptedException
- On interruption
-
sendAndWaitOrThrow
default <R extends IdUResponseType> R sendAndWaitOrThrow(IdUCommandType<R> message, Duration timeout) throws IdUClientException, InterruptedException, TimeoutException CallHBIOOperationsType.sendAndWait(HBMessageType, Duration)
but throw an exception if the result is anIdUResponseError
.- Type Parameters:
R
- The type of results- Parameters:
message
- The messagetimeout
- The timeout- Returns:
- The result
- Throws:
IdUClientException
- On errorsInterruptedException
- On interruptionTimeoutException
- On timeouts
-