类 MessageConstants
- java.lang.Object
-
- com.mysql.cj.protocol.x.MessageConstants
-
public class MessageConstants extends Object
Constants related to X Protocol messages.
-
-
字段概要
字段 修饰符和类型 字段 说明 static Map<Class<? extends com.google.protobuf.MessageLite>,Integer>MESSAGE_CLASS_TO_CLIENT_MESSAGE_TYPEStore a mapping of message class to "ClientMessages" type tag.static Map<Class<? extends com.google.protobuf.GeneratedMessageV3>,com.google.protobuf.Parser<? extends com.google.protobuf.GeneratedMessageV3>>MESSAGE_CLASS_TO_PARSERStore a mapping of "ServerMessages" class to message parsers.static Map<Class<? extends com.google.protobuf.GeneratedMessageV3>,Integer>MESSAGE_CLASS_TO_TYPEMap of class to "ServerMessages" type tag for validation of parsed message class.static Map<Integer,Class<? extends com.google.protobuf.GeneratedMessageV3>>MESSAGE_TYPE_TO_CLASSMap of "ServerMessages" type tag to class.
-
构造器概要
构造器 构造器 说明 MessageConstants()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static Class<? extends com.google.protobuf.GeneratedMessageV3>getMessageClassForType(int type)static intgetTypeForMessageClass(Class<? extends com.google.protobuf.MessageLite> msgClass)Lookup the "ClientMessages" type tag for a Protocol buffers message class.
-
-
-
字段详细资料
-
MESSAGE_CLASS_TO_PARSER
public static final Map<Class<? extends com.google.protobuf.GeneratedMessageV3>,com.google.protobuf.Parser<? extends com.google.protobuf.GeneratedMessageV3>> MESSAGE_CLASS_TO_PARSER
Store a mapping of "ServerMessages" class to message parsers. This is used to get the de-serializer after reading the type tag.
-
MESSAGE_CLASS_TO_TYPE
public static final Map<Class<? extends com.google.protobuf.GeneratedMessageV3>,Integer> MESSAGE_CLASS_TO_TYPE
Map of class to "ServerMessages" type tag for validation of parsed message class.
-
MESSAGE_TYPE_TO_CLASS
public static final Map<Integer,Class<? extends com.google.protobuf.GeneratedMessageV3>> MESSAGE_TYPE_TO_CLASS
Map of "ServerMessages" type tag to class.
-
-
方法详细资料
-
getTypeForMessageClass
public static int getTypeForMessageClass(Class<? extends com.google.protobuf.MessageLite> msgClass)
Lookup the "ClientMessages" type tag for a Protocol buffers message class.- 参数:
msgClass- message class extendingMessageLite- 返回:
- type tag for this message class
-
getMessageClassForType
public static Class<? extends com.google.protobuf.GeneratedMessageV3> getMessageClassForType(int type)
-
-