Package io.tarantool.driver.protocol
Class TarantoolResponse
- java.lang.Object
-
- io.tarantool.driver.protocol.TarantoolResponse
-
public final class TarantoolResponse extends Object
Base class for all kinds of responses received from Tarantool server. See https://www.tarantool.io/en/doc/latest/dev_guide/internals/box_protocol/#binary-protocol-responses-if-no-error-and-no-sql
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarantoolResponse
fromMessagePack(org.msgpack.core.MessageUnpacker unpacker)
Create Tarantool response from the decoded binary data usingMessageUnpacker
TarantoolResponseBody
getBody()
Get response bodyLong
getResponseCode()
Get response codeTarantoolResponseType
getResponseType()
Get response typeLong
getSyncId()
Get request ID
-
-
-
Method Detail
-
getSyncId
public Long getSyncId()
Get request ID- Returns:
- a number
-
getBody
public TarantoolResponseBody getBody()
Get response body- Returns:
- a MessagePack entity
- See Also:
Value
-
getResponseType
public TarantoolResponseType getResponseType()
Get response type- Returns:
- code of
TarantoolRequestType
type
-
getResponseCode
public Long getResponseCode()
Get response code- Returns:
- a number, equal to 0 in case of OK response
- See Also:
TarantoolResponseType
-
fromMessagePack
public static TarantoolResponse fromMessagePack(org.msgpack.core.MessageUnpacker unpacker) throws TarantoolProtocolException
Create Tarantool response from the decoded binary data usingMessageUnpacker
- Parameters:
unpacker
- configuredMessageUnpacker
- Returns:
- Tarantool response populated from the decoded binary data
- Throws:
TarantoolProtocolException
- if the unpacked data is invalid
-
-