Package org.mariadb.r2dbc.message.client
Class HandshakeResponse
- java.lang.Object
-
- org.mariadb.r2dbc.message.client.HandshakeResponse
-
- All Implemented Interfaces:
ClientMessage
public final class HandshakeResponse extends Object implements ClientMessage
-
-
Constructor Summary
Constructors Constructor Description HandshakeResponse(InitialHandshakePacket initialHandshakePacket, String username, CharSequence password, String database, Map<String,String> connectionAttributes, HostAddress hostAddress, long clientCapabilities)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static bytedecideLanguage(short serverLanguage, int majorVersion, int minorVersion)Default collation used for string exchanges with server.io.netty.buffer.ByteBufencode(Context context, io.netty.buffer.ByteBufAllocator allocator)SequencergetSequencer()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.r2dbc.message.ClientMessage
releaseEncodedBinds, resetSequencer, save
-
-
-
-
Constructor Detail
-
HandshakeResponse
public HandshakeResponse(InitialHandshakePacket initialHandshakePacket, String username, CharSequence password, String database, Map<String,String> connectionAttributes, HostAddress hostAddress, long clientCapabilities)
-
-
Method Detail
-
decideLanguage
public static byte decideLanguage(short serverLanguage, int majorVersion, int minorVersion)Default collation used for string exchanges with server. Always return 4 bytes utf8 collation for server that permit it.- Parameters:
serverLanguage- server default collationmajorVersion- server major versionminorVersion- server minor version- Returns:
- collation byte
-
encode
public io.netty.buffer.ByteBuf encode(Context context, io.netty.buffer.ByteBufAllocator allocator)
- Specified by:
encodein interfaceClientMessage
-
getSequencer
public Sequencer getSequencer()
- Specified by:
getSequencerin interfaceClientMessage
-
-