Package org.mariadb.jdbc.message.server
Class InitialHandshakePacket
java.lang.Object
org.mariadb.jdbc.message.server.InitialHandshakePacket
- All Implemented Interfaces:
ServerMessage
Server initial handshake parser. see
https://mariadb.com/kb/en/connection/#initial-handshake-packet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final long
private final short
private static final String
private final byte[]
private final short
private final long
private final ServerVersion
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
InitialHandshakePacket
(String serverVersion, long threadId, byte[] seed, long capabilities, short defaultCollation, short serverStatus, boolean mariaDBServer, String authenticationPluginType) parse result -
Method Summary
Modifier and TypeMethodDescriptionstatic InitialHandshakePacket
decode
(ReadableByteBuf reader) parsing packetreturn authentication plugin typelong
Server capabilitiesshort
Server default collationbyte[]
getSeed()
Seed for authentication plugin encryptionshort
Server status flagslong
Server thread idServer Version object
-
Field Details
-
MARIADB_RPL_HACK_PREFIX
- See Also:
-
threadId
private final long threadId -
seed
private final byte[] seed -
capabilities
private final long capabilities -
defaultCollation
private final short defaultCollation -
serverStatus
private final short serverStatus -
authenticationPluginType
-
version
-
-
Constructor Details
-
InitialHandshakePacket
private InitialHandshakePacket(String serverVersion, long threadId, byte[] seed, long capabilities, short defaultCollation, short serverStatus, boolean mariaDBServer, String authenticationPluginType) parse result- Parameters:
serverVersion
- server versionthreadId
- server thread idseed
- seedcapabilities
- server capabilitiesdefaultCollation
- default server collationserverStatus
- server status flagsmariaDBServer
- is a mariadb serverauthenticationPluginType
- default authentication plugin type
-
-
Method Details
-
decode
parsing packet- Parameters:
reader
- packet reader- Returns:
- Parsed packet
-
getVersion
Server Version object- Returns:
- server version
-
getThreadId
public long getThreadId()Server thread id- Returns:
- thread id
-
getSeed
public byte[] getSeed()Seed for authentication plugin encryption- Returns:
- seed
-
getCapabilities
public long getCapabilities()Server capabilities- Returns:
- server capabilities
-
getDefaultCollation
public short getDefaultCollation()Server default collation- Returns:
- server default collation
-
getServerStatus
public short getServerStatus()Server status flags- Returns:
- server status
-
getAuthenticationPluginType
return authentication plugin type- Returns:
- authentication plugin type
-