Class CompositeFrontendMessage
java.lang.Object
io.r2dbc.postgresql.message.frontend.CompositeFrontendMessage
- All Implemented Interfaces:
FrontendMessage, FrontendMessage.DirectEncoder
public final class CompositeFrontendMessage
extends Object
implements FrontendMessage, FrontendMessage.DirectEncoder
FrontendMessage that aggregates FrontendMessage, specifically FrontendMessage.DirectEncoder messages to send multiple FrontendMessage in a single TCP packet.- Since:
- 0.8.6
-
Nested Class Summary
Nested classes/interfaces inherited from interface FrontendMessage
FrontendMessage.DirectEncoder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(FrontendMessage message) voiddispose()Release any resources (such as bound parameter buffers) held by this message without encoding it.voidencode(io.netty.buffer.ByteBuf byteBuf) Encode a message directly by writing its content to aByteBuf.Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator) Encode a message into aByteBuf.booleaninthashCode()toString()
-
Constructor Details
-
CompositeFrontendMessage
-
CompositeFrontendMessage
-
-
Method Details
-
contains
-
encode
Description copied from interface:FrontendMessageEncode a message into aByteBuf.- Specified by:
encodein interfaceFrontendMessage- Parameters:
byteBufAllocator- the byteBufAllocator to use to get aByteBufto write into- Returns:
- a
Publisherthat produces theByteBufcontaining the encoded message
-
encode
public void encode(io.netty.buffer.ByteBuf byteBuf) Description copied from interface:FrontendMessage.DirectEncoderEncode a message directly by writing its content to aByteBuf.- Specified by:
encodein interfaceFrontendMessage.DirectEncoder- Parameters:
byteBuf- the targetByteBufto write into
-
dispose
public void dispose()Description copied from interface:FrontendMessageRelease 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.- Specified by:
disposein interfaceFrontendMessage
-
equals
-
hashCode
-
toString
-