org.apache.mina.filter.keepalive
Enum KeepAlivePolicy

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

public enum KeepAlivePolicy
extends Enum<KeepAlivePolicy>

Tells KeepAliveFilter what to do when a keep-alive response message was not received within a certain timeout.

Version:
$Rev: 594745 $, $Date: 2007-11-14 04:51:36 +0100 (Wed, 14 Nov 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Enum Constant Summary
CLOSE
          Close the connection.
EXCEPTION
          Throw a KeepAliveTimeoutException.
LOG
          Log a warning message, but doesn't do anything else.
OFF
          Do nothing; disables the filter.
 
Method Summary
static KeepAlivePolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeepAlivePolicy[] 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 KeepAlivePolicy OFF
Do nothing; disables the filter.


LOG

public static final KeepAlivePolicy LOG
Log a warning message, but doesn't do anything else.


EXCEPTION

public static final KeepAlivePolicy EXCEPTION
Throw a KeepAliveTimeoutException.


CLOSE

public static final KeepAlivePolicy CLOSE
Close the connection.

Method Detail

values

public static final KeepAlivePolicy[] 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(KeepAlivePolicy c : KeepAlivePolicy.values())
        System.out.println(c);

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

valueOf

public static KeepAlivePolicy 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.