Class NegotiateProtocolVersion

java.lang.Object
io.r2dbc.postgresql.message.backend.NegotiateProtocolVersion
All Implemented Interfaces:
BackendMessage

public final class NegotiateProtocolVersion extends Object implements BackendMessage
The NegotiateProtocolVersion message. Sent by the server when the requested minor protocol version is newer than the server supports, or when the client requested unsupported protocol options.
Since:
1.1.2
  • Constructor Details

    • NegotiateProtocolVersion

      public NegotiateProtocolVersion(int protocolMinorVersion, List<String> unsupportedOptions)
      Create a new message.
      Parameters:
      protocolMinorVersion - the newest minor protocol version supported by the server for the major protocol version requested by the client
      unsupportedOptions - the protocol options that were not recognized by the server
      Throws:
      IllegalArgumentException - if unsupportedOptions is null
  • Method Details

    • equals

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

      public int getProtocolMinorVersion()
      Returns the newest minor protocol version supported by the server for the major protocol version requested by the client.
      Returns:
      the newest minor protocol version supported by the server
    • getUnsupportedOptions

      public List<String> getUnsupportedOptions()
      Returns the protocol options that were not recognized by the server.
      Returns:
      the unsupported protocol options
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object