public final class Prelogin extends Object implements TokenStream, io.r2dbc.mssql.message.ClientMessage
PRELOGIN.Prelogin.Token| Modifier and Type | Class and Description |
|---|---|
static class |
Prelogin.Builder
Builder for
Prelogin. |
static class |
Prelogin.Encryption
Allows negotiation of the used encryption (Transport-Level Encryption via SSL) mode.
|
static class |
Prelogin.InstanceValidation
Allows validating a remote SQL server instance.
|
static class |
Prelogin.Terminator
Terminating token indicating the end of prelogin tokens.
|
static class |
Prelogin.ThreadId
Token that allows associating a client application Thread Id with the connection.
|
static class |
Prelogin.Token
Pre-Login Token.
|
static class |
Prelogin.TraceId
TraceId token that allows associating a connectionId/activityId with the connection.
|
static class |
Prelogin.UnknownToken
Token placeholder that consumes unknown tokens.
|
static class |
Prelogin.Version
Version information representing the SQL server version.
|
| Constructor and Description |
|---|
Prelogin(List<? extends Prelogin.Token> tokens)
|
| Modifier and Type | Method and Description |
|---|---|
static Prelogin.Builder |
builder() |
static Prelogin |
decode(io.netty.buffer.ByteBuf buffer)
Decode the
Prelogin response from a ByteBuf. |
TdsFragment |
encode(io.netty.buffer.ByteBufAllocator allocator,
int packetSize)
Encode a message into a
data buffer. |
boolean |
equals(Object o) |
String |
getName() |
<T extends Prelogin.Token> |
getRequiredToken(Class<? extends T> tokenType)
Resolve a
Prelogin.Token given its type. |
<T extends Prelogin.Token> |
getToken(Class<? extends T> tokenType)
Resolve a
Prelogin.Token given its type. |
List<? extends Prelogin.Token> |
getTokens() |
int |
hashCode() |
String |
toString() |
public Prelogin(List<? extends Prelogin.Token> tokens)
tokens - must not be null.public static Prelogin.Builder builder()
Prelogin.public static Prelogin decode(io.netty.buffer.ByteBuf buffer)
Prelogin response from a ByteBuf.buffer - must not be null.Prelogin response Message.public List<? extends Prelogin.Token> getTokens()
public <T extends Prelogin.Token> Optional<T> getToken(Class<? extends T> tokenType)
Prelogin.Token given its type.T - token type.tokenType - the type to filter.Optional containing the potentially found tokenType.public <T extends Prelogin.Token> T getRequiredToken(Class<? extends T> tokenType)
Prelogin.Token given its type.T - token type.tokenType - the type to filter.tokenType.NoSuchElementException - if the token could not be found.public String getName()
getName in interface TokenStreamTokenStream.public TdsFragment encode(io.netty.buffer.ByteBufAllocator allocator, int packetSize)
io.r2dbc.mssql.message.ClientMessagedata buffer. Can encode either to a scalar TdsFragment or a Publisher of TdsFragment.encode in interface io.r2dbc.mssql.message.ClientMessageallocator - the ByteBufAllocator to use to get a data buffer to write into.packetSize - packet size hint.TdsFragment or a Publisher that produces the TdsFragment containing the encoded message.Copyright © 2023. All rights reserved.