Interface FrontendMessage

All Known Implementing Classes:
Bind, CancelRequest, Close, CompositeFrontendMessage, CopyData, CopyDone, CopyFail, Describe, Execute, Flush, FunctionCall, GSSResponse, Parse, PasswordMessage, Query, SASLInitialResponse, SASLResponse, SSLRequest, StartupMessage, Sync, Terminate

public interface FrontendMessage
A message sent from a frontend client to a backend server.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Interface for messages that can be directly encoded without producing a Publisher first.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Release any resources (such as bound parameter buffers) held by this message without encoding it.
    Publisher<io.netty.buffer.ByteBuf>
    encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
    Encode a message into a ByteBuf.
  • Method Details

    • encode

      Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
      Encode a message into a ByteBuf.
      Parameters:
      byteBufAllocator - the byteBufAllocator to use to get a ByteBuf to write into
      Returns:
      a Publisher that produces the ByteBuf containing the encoded message
      Throws:
      IllegalArgumentException - if byteBufAllocator is null
    • dispose

      default void dispose()
      Release any resources (such as bound parameter buffers) held by this message without encoding it. Invoked when a message is discarded before reaching the wire, e.g. when the connection is closed or the conversation is cancelled while the message is still queued. The default implementation does nothing. Implementations that own reference-counted buffers must release them here and must be idempotent so that disposal is safe regardless of whether the message was already encoded.