Package org.mariadb.jdbc.message.server
Class InitialHandshakePacket
- java.lang.Object
-
- org.mariadb.jdbc.message.server.InitialHandshakePacket
-
- All Implemented Interfaces:
ServerMessage
public final class InitialHandshakePacket extends java.lang.Object implements ServerMessage
Server initial handshake parser. see https://mariadb.com/kb/en/connection/#initial-handshake-packet
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
authenticationPluginType
private long
capabilities
private short
defaultCollation
private static java.lang.String
MARIADB_RPL_HACK_PREFIX
private byte[]
seed
private short
serverStatus
private long
threadId
private ServerVersion
version
-
Constructor Summary
Constructors Modifier Constructor Description private
InitialHandshakePacket(java.lang.String serverVersion, long threadId, byte[] seed, long capabilities, short defaultCollation, short serverStatus, boolean mariaDBServer, java.lang.String authenticationPluginType)
parse result
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InitialHandshakePacket
decode(ReadableByteBuf reader)
parsing packetjava.lang.String
getAuthenticationPluginType()
return authentication plugin typelong
getCapabilities()
Server capabilitiesshort
getDefaultCollation()
Server default collationbyte[]
getSeed()
Seed for authentication plugin encryptionshort
getServerStatus()
Server status flagslong
getThreadId()
Server thread idServerVersion
getVersion()
Server Version object
-
-
-
Field Detail
-
MARIADB_RPL_HACK_PREFIX
private static final java.lang.String MARIADB_RPL_HACK_PREFIX
- See Also:
- Constant Field Values
-
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
private final java.lang.String authenticationPluginType
-
version
private final ServerVersion version
-
-
Constructor Detail
-
InitialHandshakePacket
private InitialHandshakePacket(java.lang.String serverVersion, long threadId, byte[] seed, long capabilities, short defaultCollation, short serverStatus, boolean mariaDBServer, java.lang.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 Detail
-
decode
public static InitialHandshakePacket decode(ReadableByteBuf reader)
parsing packet- Parameters:
reader
- packet reader- Returns:
- Parsed packet
-
getVersion
public ServerVersion 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
public java.lang.String getAuthenticationPluginType()
return authentication plugin type- Returns:
- authentication plugin type
-
-