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

## Class ClientMessageParser

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.client.ClientMessageParser

All Implemented Interfaces:
  ClientListenerMessageParser

    public class ClientMessageParser
    extends Object
    implements ClientListenerMessageParser

Thin client message parser.

### Field Summary

Fields
`static short` `OP_COMPUTE_TASK_FINISHED`
`static short` `OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION`

### Method Summary

All Methods Instance Methods Concrete Methods
`ClientListenerRequest` `decode(BinaryReaderExImpl reader)` Decodes the request.
`ClientListenerRequest` `decode(ClientMessage msg)` Decode request from byte array.
`int` `decodeCommandType(ClientMessage msg)` Decode command type.
`long` `decodeRequestId(ClientMessage msg)` Decode request Id.
`ClientMessage` `encode(ClientListenerResponse resp)` Encode response to byte array.

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

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

### Field Detail

#### OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION

    public static final short OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION

See Also:
  Constant Field Values

#### OP_COMPUTE_TASK_FINISHED

    public static final short OP_COMPUTE_TASK_FINISHED

See Also:
  Constant Field Values

### Method Detail

#### decode

    public ClientListenerRequest decode(ClientMessage msg)

Decode request from byte array.

Specified by:
  `decode` in interface `ClientListenerMessageParser`
Parameters:
  `msg` - Message.
Returns:
  Request.

#### decode

    public ClientListenerRequest decode(BinaryReaderExImpl reader)

Decodes the request.

Parameters:
  `reader` - Reader.
Returns:
  Request.

#### encode

    public ClientMessage encode(ClientListenerResponse resp)

Encode response to byte array.

Specified by:
  `encode` in interface `ClientListenerMessageParser`
Parameters:
  `resp` - Response.
Returns:
  Message.

#### decodeCommandType

    public int decodeCommandType(ClientMessage msg)

Decode command type. Allows to recognize the command (message type) without decoding the entire message.

Specified by:
  `decodeCommandType` in interface `ClientListenerMessageParser`
Parameters:
  `msg` - Message.
Returns:
  Command type.

#### decodeRequestId

    public long decodeRequestId(ClientMessage msg)

Decode request Id. Allows to recognize the request Id, if any, without decoding the entire message.

Specified by:
  `decodeRequestId` in interface `ClientListenerMessageParser`
Parameters:
  `msg` - Message.
Returns:
  Request Id.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022