Class DefaultMessageSizeEstimator
java.lang.Object
io.netty.channel.DefaultMessageSizeEstimator
- All Implemented Interfaces:
MessageSizeEstimator
Default
MessageSizeEstimator implementation which supports the estimation of the size of
ByteBuf, ByteBufHolder and FileRegion.-
Nested Class Summary
Nested classes/interfaces inherited from interface MessageSizeEstimator
MessageSizeEstimator.Handle -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MessageSizeEstimatorReturn the default implementation which returns8for unknown messages. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT
Return the default implementation which returns8for unknown messages.
-
-
Constructor Details
-
DefaultMessageSizeEstimator
public DefaultMessageSizeEstimator(int unknownSize) Create a new instance- Parameters:
unknownSize- The size which is returned for unknown messages.
-
-
Method Details
-
newHandle
Description copied from interface:MessageSizeEstimatorCreates a new handle. The handle provides the actual operations.- Specified by:
newHandlein interfaceMessageSizeEstimator
-