Author: trustin
Date: Sat Nov 3 04:24:03 2007
New Revision: 591597
URL: http://svn.apache.org/viewvc?rev=591597&view=rev
Log:
Updated JavaDoc a little bit...
Modified:
mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilter.java
Modified:
mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilter.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilter.java?rev=591597&r1=591596&r2=591597&view=diff
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilter.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/filter/traffic/ReadThrottleFilter.java
Sat Nov 3 04:24:03 2007
@@ -20,16 +20,13 @@
package org.apache.mina.filter.traffic;
import java.util.Map;
-import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.mina.common.AttributeKey;
-import org.apache.mina.common.DefaultIoFilterChainBuilder;
import org.apache.mina.common.IoBuffer;
import org.apache.mina.common.IoFilter;
import org.apache.mina.common.IoFilterAdapter;
import org.apache.mina.common.IoFilterChain;
-import org.apache.mina.common.IoFilterChainBuilder;
import org.apache.mina.common.IoService;
import org.apache.mina.common.IoSession;
import org.apache.mina.common.IoSessionLogger;
@@ -38,14 +35,12 @@
import org.apache.mina.util.CopyOnWriteMap;
/**
- * An [EMAIL PROTECTED] IoFilterChainBuilder} that configures an
{IoFilterChain} or
- * [EMAIL PROTECTED] DefaultIoFilterChainBuilder} to control incoming traffic
to
+ * An [EMAIL PROTECTED] IoFilter} that throttles incoming traffic to
* prevent a unwanted [EMAIL PROTECTED] OutOfMemoryError} under heavy load.
* <p>
- * The filters that this builder inserts will automatically disable reads
- * on an [EMAIL PROTECTED] IoSession} once the data batched for that session
in the
- * [EMAIL PROTECTED] ExecutorFilter} reaches a defined threshold. It
accomplishes this
- * by adding one filter before the [EMAIL PROTECTED] Executor} and the other
after the
+ * This filter will automatically disable reads on an [EMAIL PROTECTED]
IoSession} once
+ * the amount of the read data batched for that session in the [EMAIL
PROTECTED] ExecutorFilter}
+ * reaches a defined threshold. It accomplishes this by adding one filter
before the
* [EMAIL PROTECTED] ExecutorFilter}.
* <p>
* The size of the received data is calculated by [EMAIL PROTECTED]
MessageSizeEstimator}.
@@ -54,25 +49,10 @@
* calculation. However, the [EMAIL PROTECTED] DefaultMessageSizeEstimator}
will suffice
* in most cases.
* <p>
- * It is recommended to use this builder at the end of your filter chain
- * construction because it is possible to subvert the behavior of the added
- * filters by adding filters immediately after the [EMAIL PROTECTED]
ExecutorFilter}
- * after using this builder, consequently leading to a unexpected behavior.
- *
- * <h3>Usage</h3>
- * <pre><code>
- * DefaultFilterChainBuilder chain = ...
- * ReadThrottleFilterChainBuilder builder = new
ReadThrottleFilterChainBuilder();
- * filter.buildFilerChain( chain );
- * </code></pre>
- *
- * or
- *
- * <pre><code>
- * IoFilterChain chain = ...
- * ReadThrottleFilterChainBuilder builder = new
ReadThrottleFilterChainBuilder();
- * filter.buildFilerChain( chain );
- * </code></pre>
+ * It is recommended to add this filter at the end of your filter chain
+ * configuration because it is possible to subvert the behavior of the added
+ * filters by adding a filter immediately before/after the [EMAIL PROTECTED]
ExecutorFilter}
+ * after inserting this builder, consequently leading to a unexpected behavior.
*
* @author The Apache MINA Project ([EMAIL PROTECTED])
* @version $Rev$, $Date$