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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for messages that can be directly encoded without producing aPublisherfirst. -
Method Summary
-
Method Details
-
encode
Encode a message into aByteBuf.- Parameters:
byteBufAllocator- the byteBufAllocator to use to get aByteBufto write into- Returns:
- a
Publisherthat produces theByteBufcontaining the encoded message - Throws:
IllegalArgumentException- ifbyteBufAllocatorisnull
-
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.
-