## org.red5.server.net.filter
Class DefaultMessageSizeEstimator

    java.lang.Object
      org.red5.server.net.filter.DefaultMessageSizeEstimator

All Implemented Interfaces:
  MessageSizeEstimator

    public class DefaultMessageSizeEstimator

extends Object
implements MessageSizeEstimator

A default `MessageSizeEstimator` implementation.

Martin's Java Notes was used for estimation of the size of non-`IoBuffer`s. For unknown types, it inspects declaring fields of the class of the specified message. The size of unknown declaring fields are approximated to the specified `averageSizePerField` (default: 64).

All the estimated sizes of classes are cached for performance improvement.
This originated from the Mina sandbox.

Constructor Summary
`DefaultMessageSizeEstimator()`

Method Summary
`int` `estimateSize(Object message)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultMessageSizeEstimator

    public DefaultMessageSizeEstimator()

Method Detail

### estimateSize

    public int estimateSize(Object message)

  Specified by:
    `estimateSize` in interface `MessageSizeEstimator`

Copyright © 2006-2010 The Red5 Project