org.apache.mina.filter.traffic
Enum ReadThrottlePolicy

java.lang.Object
  extended by java.lang.Enum<ReadThrottlePolicy>
      extended by org.apache.mina.filter.traffic.ReadThrottlePolicy
All Implemented Interfaces:
Serializable, Comparable<ReadThrottlePolicy>

public enum ReadThrottlePolicy
extends Enum<ReadThrottlePolicy>

Tells ReadThrottleFilter what to do when the read buffer grows up too much.

Version:
$Rev: 593474 $, $Date: 2007-11-09 11:14:12 +0100 (Fri, 09 Nov 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Enum Constant Summary
BLOCK
          Block the write operation until the size of write request buffer is full.
CLOSE
           
EXCEPTION
           
LOG
          Log a warning message, but doesn't limit anything.
OFF
          Do nothing; disables the filter.
 
Method Summary
static ReadThrottlePolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ReadThrottlePolicy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OFF

public static final ReadThrottlePolicy OFF
Do nothing; disables the filter.


LOG

public static final ReadThrottlePolicy LOG
Log a warning message, but doesn't limit anything. The warning message is logged at most every 3 seconds to avoid log flooding.


BLOCK

public static final ReadThrottlePolicy BLOCK
Block the write operation until the size of write request buffer is full. You must use this policy in conjunction with the ReadThrottleFilter to prevent the OutOfMemoryError on the reader side.


EXCEPTION

public static final ReadThrottlePolicy EXCEPTION

CLOSE

public static final ReadThrottlePolicy CLOSE
Method Detail

values

public static final ReadThrottlePolicy[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ReadThrottlePolicy c : ReadThrottlePolicy.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ReadThrottlePolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name


Copyright © 2004-2009 Apache MINA Project. All Rights Reserved.