public final class StartupMessage extends Object implements FrontendMessage
| Modifier and Type | Class and Description |
|---|---|
static interface |
StartupMessage.ParameterWriter
Writer interface to expose startup parameters.
|
static interface |
StartupMessage.StartupParameterProvider
Interface that provides startup parameters into a
StartupMessage.ParameterWriter. |
FrontendMessage.DirectEncoder| Constructor and Description |
|---|
StartupMessage(String database,
String username,
StartupMessage.StartupParameterProvider parameterProvider)
Create a new message.
|
| Modifier and Type | Method and Description |
|---|---|
Publisher<io.netty.buffer.ByteBuf> |
encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
Encode a message into a
ByteBuf. |
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
public StartupMessage(@Nullable String database, String username, StartupMessage.StartupParameterProvider parameterProvider)
database - the database to connect to. Defaults to the username.username - the database username to connect asparameterProvider - the provider providing database connection optionsIllegalArgumentException - if applicationName or username is nullpublic Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
FrontendMessageByteBuf.encode in interface FrontendMessagebyteBufAllocator - the byteBufAllocator to use to get a ByteBuf to write intoPublisher that produces the ByteBuf containing the encoded messageCopyright © 2024. All rights reserved.