Class DefaultMessageSizeEstimator.HandleImpl
java.lang.Object
io.netty.channel.DefaultMessageSizeEstimator.HandleImpl
- All Implemented Interfaces:
MessageSizeEstimator.Handle
- Enclosing class:
DefaultMessageSizeEstimator
private static final class DefaultMessageSizeEstimator.HandleImpl
extends java.lang.Object
implements MessageSizeEstimator.Handle
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintsize(java.lang.Object msg) Calculate the size of the given message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
unknownSize
private final int unknownSize
-
-
Constructor Details
-
HandleImpl
private HandleImpl(int unknownSize)
-
-
Method Details
-
size
public int size(java.lang.Object msg) Description copied from interface:MessageSizeEstimator.HandleCalculate the size of the given message.- Specified by:
sizein interfaceMessageSizeEstimator.Handle- Parameters:
msg- The message for which the size should be calculated- Returns:
- size The size in bytes. The returned size must be >= 0
-