Package org.eclipse.net4j.buffer

# Enum-Klasse BufferState

java.lang.Object
java.lang.Enum<BufferState>
org.eclipse.net4j.buffer.BufferState

Alle implementierten Schnittstellen:
  `Serializable`, `Comparable<BufferState>`, `Constable`

public enum BufferState extends Enum<BufferState>
Enumerates the internal states of an `IBuffer`.

Autor:
  Eike Stepper
No Extend
  This interface is not intended to be extended by clients.

## Verschachtelte Klassen - Übersicht

## Von Klasse geerbte verschachtelte Klassen/Schnittstellen java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum-Konstanten - Übersicht

Enum-Konstanten
Enum-Konstante
Beschreibung
`DISPOSED`
Indicates that the `IBuffer` can not be used anymore.
`GETTING`
Indicates that the `IBuffer` can provide a `ByteBuffer` that can be used for getting data.
`INITIAL`
Indicates that the `IBuffer` has just been provided by its `IBufferProvider` or that is has been used and subsequently `cleared`.
`PUTTING`
Indicates that the `IBuffer` can provide a `ByteBuffer` that can be used for putting data.
`READING_BODY`
Indicates that the `IBuffer` is currently reading its body from a `SocketChannel`.
`READING_HEADER`
Indicates that the `IBuffer` is currently reading its header from a `SocketChannel`.
`RELEASED`
Indicates that the `IBuffer` is owned by its `IBufferProvider`.
`WRITING`
Indicates that the `IBuffer` is currently writing its data to a `SocketChannel`.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`static BufferState`
`valueOf(String name)`
Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück.
`static BufferState[]`
`values()`
Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.

### Von Klasse geerbte Methoden java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Von Klasse geerbte Methoden java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum-Konstanten - Details

### INITIAL

public static final BufferState INITIAL
Indicates that the `IBuffer` has just been provided by its `IBufferProvider` or that is has been used and subsequently `cleared`.

A transition to `PUTTING` can be triggered by calling `IBuffer.startPutting(short)` once. If the buffer is intended to be passed to an `IChannel` later the `channel index` of that Channel has to be passed because it is part of the buffer's header. A `ByteBuffer` is returned that can be used for putting data.

A transition to `GETTING` can be triggered by calling `IBuffer.startGetting(SocketChannel)` repeatedly until it finally returns a `ByteBuffer` that can be used for getting data.

### PUTTING

public static final BufferState PUTTING
Indicates that the `IBuffer` can provide a `ByteBuffer` that can be used for putting data.

A transition to `WRITING` can be triggered by calling `IBuffer.write(SocketChannel)`.

A transition to `GETTING` can be triggered by calling `IBuffer.flip()`.

A transition to `INITIAL` can be triggered by calling `IBuffer.clear()`.

### WRITING

public static final BufferState WRITING
Indicates that the `IBuffer` is currently writing its data to a `SocketChannel`.

Self transitions to `WRITING` can be triggered by repeatedly calling `IBuffer.write(SocketChannel)` until it returns `true`.

A transition to `INITIAL` can be triggered by calling `IBuffer.clear()`.

### READING_HEADER

public static final BufferState READING_HEADER
Indicates that the `IBuffer` is currently reading its header from a `SocketChannel`.

Transitions to `READING_HEADER`, `READING_BODY` or `GETTING` can be triggered by repeatedly calling `IBuffer.startGetting(SocketChannel)` until it returns a `ByteBuffer` that can be used for getting data.

A transition to `INITIAL` can be triggered by calling `IBuffer.clear()`.

### READING_BODY

public static final BufferState READING_BODY
Indicates that the `IBuffer` is currently reading its body from a `SocketChannel`.

Transitions to `READING_BODY` or `GETTING` can be triggered by repeatedly calling `IBuffer.startGetting(SocketChannel)` until it returns a `ByteBuffer` that can be used for getting data.

A transition to `INITIAL` can be triggered by calling `IBuffer.clear()`.

### GETTING

public static final BufferState GETTING
Indicates that the `IBuffer` can provide a `ByteBuffer` that can be used for getting data.

A transition to `INITIAL` can be triggered by calling `IBuffer.clear()`.

### RELEASED

public static final BufferState RELEASED
Indicates that the `IBuffer` is owned by its `IBufferProvider`.

Seit:
  3.0

### DISPOSED

public static final BufferState DISPOSED
Indicates that the `IBuffer` can not be used anymore.

Seit:
  3.0

## Methodendetails

### values

public static BufferState[] values()
Gibt ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration zurück.

Gibt zurück:
  ein Array mit den Konstanten dieser Enum-Klasse in der Reihenfolge ihrer Deklaration

### valueOf

public static BufferState valueOf(String name)
Gibt die Enum-Konstante dieser Klasse mit dem angegebenen Namen zurück. Die Zeichenfolge muss exakt mit einer ID übereinstimmen, mit der eine Enum-Konstante in dieser Klasse deklariert wird. (Zusätzliche Leerzeichen sind nicht zulässig.)

Parameter:
  `name` - Name der zurückzugebenden Enumerationskonstante.
Gibt zurück:
  Enumerationskonstante mit dem angegebenen Namen
Löst aus:
  `IllegalArgumentException` - wenn diese Enum-Klasse keine Konstante mit dem angegebenen Namen enthält
  `NullPointerException` - wenn das Argument nicht angegeben wird