Class OdbcMessageParser
- java.lang.Object
-
- org.apache.ignite.internal.processors.odbc.odbc.OdbcMessageParser
-
- All Implemented Interfaces:
ClientListenerMessageParser
public class OdbcMessageParser extends Object implements ClientListenerMessageParser
JDBC message parser.
-
-
Field Summary
Fields Modifier and Type Field Description protected GridKernalContextctxKernal context.protected static intINIT_CAPInitial output stream capacity.
-
Constructor Summary
Constructors Constructor Description OdbcMessageParser(GridKernalContext ctx, ClientListenerProtocolVersion ver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientListenerRequestdecode(ClientMessage msg)Decode request from byte array.intdecodeCommandType(ClientMessage msg)Decode command type.longdecodeRequestId(ClientMessage msg)Decode request Id.ClientMessageencode(ClientListenerResponse msg0)Encode response to byte array.
-
-
-
Field Detail
-
INIT_CAP
protected static final int INIT_CAP
Initial output stream capacity.- See Also:
- Constant Field Values
-
ctx
protected final GridKernalContext ctx
Kernal context.
-
-
Constructor Detail
-
OdbcMessageParser
public OdbcMessageParser(GridKernalContext ctx, ClientListenerProtocolVersion ver)
- Parameters:
ctx- Context.ver- Protocol version.
-
-
Method Detail
-
decode
public ClientListenerRequest decode(ClientMessage msg)
Decode request from byte array.- Specified by:
decodein interfaceClientListenerMessageParser- Parameters:
msg- Message.- Returns:
- Request.
-
encode
public ClientMessage encode(ClientListenerResponse msg0)
Encode response to byte array.- Specified by:
encodein interfaceClientListenerMessageParser- Parameters:
msg0- 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:
decodeCommandTypein interfaceClientListenerMessageParser- 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:
decodeRequestIdin interfaceClientListenerMessageParser- Parameters:
msg- Message.- Returns:
- Request Id.
-
-