Class StartupMessage

java.lang.Object
io.r2dbc.postgresql.message.frontend.StartupMessage
All Implemented Interfaces:
FrontendMessage

public final class StartupMessage extends Object implements FrontendMessage
The StartupMessage message.
  • Constructor Details

    • StartupMessage

      public StartupMessage(@Nullable String database, String username, StartupMessage.StartupParameterProvider parameterProvider)
      Create a new message.
      Parameters:
      database - the database to connect to. Defaults to the username.
      username - the database username to connect as
      parameterProvider - the provider providing database connection options
      Throws:
      IllegalArgumentException - if applicationName or username is null
  • Method Details

    • encode

      public Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
      Description copied from interface: FrontendMessage
      Encode a message into a ByteBuf.
      Specified by:
      encode in interface FrontendMessage
      Parameters:
      byteBufAllocator - the byteBufAllocator to use to get a ByteBuf to write into
      Returns:
      a Publisher that produces the ByteBuf containing the encoded message
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object