Package org.mariadb.jdbc.message.client
Class HandshakeResponse
- java.lang.Object
-
- org.mariadb.jdbc.message.client.HandshakeResponse
-
- All Implemented Interfaces:
ClientMessage
public final class HandshakeResponse extends java.lang.Object implements ClientMessage
Server handshake response builder.- See Also:
- documentation
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String_CLIENT_NAMEprivate static java.lang.String_CLIENT_VERSIONprivate static java.lang.String_JAVA_VENDORprivate static java.lang.String_JAVA_VERSIONprivate static java.lang.String_OSprivate static java.lang.String_SERVER_HOSTprivate static java.lang.String_THREADprivate java.lang.StringauthenticationPluginTypeprivate longclientCapabilitiesprivate java.lang.StringconnectionAttributesprivate java.lang.Stringdatabaseprivate byteexchangeCharsetprivate java.lang.Stringhostprivate java.lang.CharSequencepasswordprivate byte[]seedprivate java.lang.Stringusername
-
Constructor Summary
Constructors Constructor Description HandshakeResponse(Credential credential, java.lang.String authenticationPluginType, byte[] seed, Configuration conf, java.lang.String host, long clientCapabilities, byte exchangeCharset)Object with parsed results
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intencode(Writer writer, Context context)Encode client message to socket.private static voidwriteConnectAttributes(Writer writer, java.lang.String connectionAttributes, java.lang.String host)private static voidwriteStringLength(Writer encoder, java.lang.String value)private static voidwriteStringLengthAscii(Writer encoder, java.lang.String value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.message.ClientMessage
batchUpdateLength, binaryProtocol, canSkipMeta, description, getLocalInfileInputStream, mightBeBulkResult, readPacket, validateLocalFileName
-
-
-
-
Field Detail
-
_CLIENT_NAME
private static final java.lang.String _CLIENT_NAME
- See Also:
- Constant Field Values
-
_CLIENT_VERSION
private static final java.lang.String _CLIENT_VERSION
- See Also:
- Constant Field Values
-
_SERVER_HOST
private static final java.lang.String _SERVER_HOST
- See Also:
- Constant Field Values
-
_OS
private static final java.lang.String _OS
- See Also:
- Constant Field Values
-
_THREAD
private static final java.lang.String _THREAD
- See Also:
- Constant Field Values
-
_JAVA_VENDOR
private static final java.lang.String _JAVA_VENDOR
- See Also:
- Constant Field Values
-
_JAVA_VERSION
private static final java.lang.String _JAVA_VERSION
- See Also:
- Constant Field Values
-
username
private final java.lang.String username
-
password
private final java.lang.CharSequence password
-
database
private final java.lang.String database
-
connectionAttributes
private final java.lang.String connectionAttributes
-
host
private final java.lang.String host
-
clientCapabilities
private final long clientCapabilities
-
exchangeCharset
private final byte exchangeCharset
-
seed
private final byte[] seed
-
authenticationPluginType
private java.lang.String authenticationPluginType
-
-
Constructor Detail
-
HandshakeResponse
public HandshakeResponse(Credential credential, java.lang.String authenticationPluginType, byte[] seed, Configuration conf, java.lang.String host, long clientCapabilities, byte exchangeCharset)
Object with parsed results- Parameters:
credential- credentialauthenticationPluginType- authentication plugin to useseed- server seedconf- configurationhost- current hostclientCapabilities- client capabilitiesexchangeCharset- connection charset
-
-
Method Detail
-
writeStringLengthAscii
private static void writeStringLengthAscii(Writer encoder, java.lang.String value) throws java.io.IOException
- Throws:
java.io.IOException
-
writeStringLength
private static void writeStringLength(Writer encoder, java.lang.String value) throws java.io.IOException
- Throws:
java.io.IOException
-
writeConnectAttributes
private static void writeConnectAttributes(Writer writer, java.lang.String connectionAttributes, java.lang.String host) throws java.io.IOException
- Throws:
java.io.IOException
-
encode
public int encode(Writer writer, Context context) throws java.io.IOException
Description copied from interface:ClientMessageEncode client message to socket.- Specified by:
encodein interfaceClientMessage- Parameters:
writer- socket writercontext- connection context- Returns:
- number of client message written
- Throws:
java.io.IOException- if socket error occur
-
-