public enum BufferState extends java.lang.Enum<BufferState>
IBuffer.| Enum Constant and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
static BufferState |
valueOf(java.lang.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.
|
public static final BufferState INITIAL
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.
public static final BufferState PUTTING
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().
public static final BufferState WRITING
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().
public static final BufferState READING_HEADER
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().
public static final BufferState READING_BODY
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().
public static final BufferState GETTING
IBuffer can provide a ByteBuffer that can be used for getting data.
A transition to INITIAL can be triggered by calling IBuffer.clear().
public static final BufferState RELEASED
IBuffer is owned by its IBufferProvider.public static final BufferState DISPOSED
IBuffer can not be used anymore.public static BufferState[] values()
for (BufferState c : BufferState.values()) System.out.println(c);
public static BufferState valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullCopyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html