public interface SyncReader
| Modifier and Type | Method and Description |
|---|---|
void |
init()
Initialize reading in the background.
|
void |
initAndWait()
Initialize internal threads and wait for server init response.
|
default Message |
receive()
Receive a
Message. |
default Message |
receive(long timeout,
TimeUnit unit)
Receive a
Message. |
Message |
receive(ReceiveSettings settings)
Receive a
Message. |
void |
shutdown()
Stops internal threads and makes cleanup in background.
|
void init()
void initAndWait()
Message receive(ReceiveSettings settings) throws InterruptedException
Message. Blocks until a Message is received.settings - settings for receiving a MessageMessage, or null if the specified timeout time elapses before a message is availableInterruptedException@Nullable default Message receive(long timeout, TimeUnit unit) throws InterruptedException
Message. Blocks until a Message is received.timeout - timeout to wait a Message withunit - TimeUnit for timeoutMessage, or null if the specified waiting time elapses before a message is availableInterruptedExceptiondefault Message receive() throws InterruptedException
Message. Blocks until a Message is received.MessageInterruptedExceptionvoid shutdown()
Copyright © 2024. All rights reserved.