public interface ClientOutput
| Modifier and Type | Method and Description |
|---|---|
boolean |
sendMessage(TransportMessage transportMessage)
Sends a message according to the single message protocol.
|
ClientRequest |
sendRequest(RemoteAddress addr,
io.zeebe.util.buffer.BufferWriter writer)
Sends a request according to the request response protocol to a given remote
|
ClientRequest |
sendRequestWithRetry(RemoteAddress addr,
io.zeebe.util.buffer.BufferWriter writer)
Same as
sendRequestWithRetry(RemoteAddress, BufferWriter, long) where the timeout is set to the configured default timeout. |
ClientRequest |
sendRequestWithRetry(RemoteAddress addr,
io.zeebe.util.buffer.BufferWriter writer,
long timeout)
Like
sendRequest(RemoteAddress, BufferWriter) but retries the request if there is no current connection. |
boolean sendMessage(TransportMessage transportMessage)
Sends a message according to the single message protocol.
Returns false if the message cannot be currently written due to exhausted capacity. Throws an exception if the request is not sendable at all (e.g. buffer writer throws exception).
ClientRequest sendRequest(RemoteAddress addr, io.zeebe.util.buffer.BufferWriter writer)
Sends a request according to the request response protocol to a given remote
Returns null if request cannot be currently written to the send buffer due to exhausted capacity.
Throws an exception if the request is not sendable at all (e.g. buffer writer throws exception).
Returns a future to the response content else.
The future throws fails with NotConnectedException if the addressed remote is currently
not connected.
The returned request object MUST be closed when it is not needed anymore.
Guarantees:
ClientRequest sendRequestWithRetry(RemoteAddress addr, io.zeebe.util.buffer.BufferWriter writer, long timeout)
Like sendRequest(RemoteAddress, BufferWriter) but retries the request if there is no current connection.
Makes this method more robust in the presence of short intermittent disconnects.
Guarantees:
timeout - Timeout in milliseconds until the returned future fails if no response is received.ClientRequest sendRequestWithRetry(RemoteAddress addr, io.zeebe.util.buffer.BufferWriter writer)
sendRequestWithRetry(RemoteAddress, BufferWriter, long) where the timeout is set to the configured default timeout.Copyright © 2017–2018 camunda services GmbH. All rights reserved.