org.apache.ignite.internal.processors.platform.client

## Class ClientResponse

- java.lang.Object
- - org.apache.ignite.internal.processors.odbc.ClientListenerResponse
  - - org.apache.ignite.internal.processors.platform.client.ClientResponse

All Implemented Interfaces:
  ClientOutgoingMessage

Direct Known Subclasses:
  ClientBinaryTypeGetResponse, ClientBooleanResponse, ClientByteResponse, ClientCacheGetConfigurationResponse, ClientCacheGetNamesResponse, ClientClusterGroupGetNodeIdsResponse, ClientClusterGroupGetNodesDetailsResponse, ClientClusterGroupGetNodesEndpointsResponse, ClientExecuteTaskResponse, ClientIntResponse, ClientLongResponse, ClientObjectResponse, ClientStringResponse

    public class ClientResponse
    extends ClientListenerResponse
    implements ClientOutgoingMessage

Thin client response.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.odbc.ClientListenerResponse

`STATUS_FAILED, STATUS_SUCCESS`

### Constructor Summary

Constructors
Constructor and Description
`ClientResponse(long reqId)` Constructor.
`ClientResponse(long reqId, int status, String err)` Constructor.
`ClientResponse(long reqId, String err)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `encode(ClientConnectionContext ctx, BinaryRawWriterEx writer)` Encodes the response data.
`void` `encode(ClientConnectionContext ctx, BinaryRawWriterEx writer, ClientAffinityTopologyVersion affinityVer)` Encodes the response data.
`long` `requestId()` Gets the request id.

### Methods inherited from class org.apache.ignite.internal.processors.odbc.ClientListenerResponse

`error, error, onSent, status, status`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ClientResponse

    public ClientResponse(long reqId)

Constructor.

Parameters:
  `reqId` - Request id.

#### ClientResponse

    public ClientResponse(long reqId,
                          String err)

Constructor.

Parameters:
  `reqId` - Request id.
  `err` - Error message.

#### ClientResponse

    public ClientResponse(long reqId,
                          int status,
                          String err)

Constructor.

Parameters:
  `reqId` - Request id.
  `status` - Status code.
  `err` - Error message.

### Method Detail

#### encode

    public void encode(ClientConnectionContext ctx,
                       BinaryRawWriterEx writer,
                       ClientAffinityTopologyVersion affinityVer)

Encodes the response data. Used when response result depends on the specific affinity version.

Parameters:
  `ctx` - Connection context.
  `writer` - Writer.
  `affinityVer` - Affinity version.

#### encode

    public void encode(ClientConnectionContext ctx,
                       BinaryRawWriterEx writer)

Encodes the response data.

Specified by:
  `encode` in interface `ClientOutgoingMessage`
Parameters:
  `ctx` - Connection context.
  `writer` - Writer.

#### requestId

    public long requestId()

Gets the request id.

Returns:
  Request id.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020