org.restlet.engine.io
Enum BufferState

java.lang.Object
  extended by java.lang.Enum<BufferState>
      extended by org.restlet.engine.io.BufferState
All Implemented Interfaces:
Serializable, Comparable<BufferState>

public enum BufferState
extends Enum<BufferState>

Enumeration of buffer and builder states. It is useful for asynchronous non-blocking filling.

Author:
Jerome Louvel

Enum Constant Summary
DRAINING
          Buffer or builder ready for reading or draining.
FILLED
          End of filling detected but not yet ready for draining.
FILLING
          Filling the buffer or builder.
IDLE
          Buffer or builder idle.
 
Method Summary
static BufferState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BufferState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IDLE

public static final BufferState IDLE
Buffer or builder idle.


FILLING

public static final BufferState FILLING
Filling the buffer or builder.


FILLED

public static final BufferState FILLED
End of filling detected but not yet ready for draining.


DRAINING

public static final BufferState DRAINING
Buffer or builder ready for reading or draining.

Method Detail

values

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

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

valueOf

public static BufferState 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
NullPointerException - if the argument is null


Copyright © 2005-2013 Restlet.