public final class StartupMessage extends Object implements FrontendMessage
FrontendMessage.DirectEncoder| Constructor and Description |
|---|
StartupMessage(String applicationName,
String database,
String username,
Map<String,String> options)
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(String applicationName, @Nullable String database, String username, @Nullable Map<String,String> options)
applicationName - the name of the application connecting to the databasedatabase - the database to connect to. Defaults to the user name.username - the database user name to connect asoptions - 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 © 2022. All rights reserved.