Enum Class BufferState
- All Implemented Interfaces:
Serializable
,Comparable<BufferState>
,Constable
IBuffer
.- Author:
- Eike Stepper
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that theIBuffer
can not be used anymore.Indicates that theIBuffer
can provide aByteBuffer
that can be used for getting data.Indicates that theIBuffer
has just been provided by itsIBufferProvider
or that is has been used and subsequentlycleared
.Indicates that theIBuffer
can provide aByteBuffer
that can be used for putting data.Indicates that theIBuffer
is currently reading its body from aSocketChannel
.Indicates that theIBuffer
is currently reading its header from aSocketChannel
.Indicates that theIBuffer
is owned by itsIBufferProvider
.Indicates that theIBuffer
is currently writing its data to aSocketChannel
. -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferState
Returns the enum constant of this class with the specified name.static BufferState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INITIAL
Indicates that theIBuffer
has just been provided by itsIBufferProvider
or that is has been used and subsequentlycleared
.A transition to
PUTTING
can be triggered by callingIBuffer.startPutting(short)
once. If the buffer is intended to be passed to anIChannel
later thechannel index
of that Channel has to be passed because it is part of the buffer's header. AByteBuffer
is returned that can be used for putting data.A transition to
GETTING
can be triggered by callingIBuffer.startGetting(SocketChannel)
repeatedly until it finally returns aByteBuffer
that can be used for getting data. -
PUTTING
Indicates that theIBuffer
can provide aByteBuffer
that can be used for putting data.A transition to
WRITING
can be triggered by callingIBuffer.write(SocketChannel)
.A transition to
GETTING
can be triggered by callingIBuffer.flip()
.A transition to
INITIAL
can be triggered by callingIBuffer.clear()
. -
WRITING
Indicates that theIBuffer
is currently writing its data to aSocketChannel
.Self transitions to
WRITING
can be triggered by repeatedly callingIBuffer.write(SocketChannel)
until it returnstrue
.A transition to
INITIAL
can be triggered by callingIBuffer.clear()
. -
READING_HEADER
Indicates that theIBuffer
is currently reading its header from aSocketChannel
.Transitions to
READING_HEADER
,READING_BODY
orGETTING
can be triggered by repeatedly callingIBuffer.startGetting(SocketChannel)
until it returns aByteBuffer
that can be used for getting data.A transition to
INITIAL
can be triggered by callingIBuffer.clear()
. -
READING_BODY
Indicates that theIBuffer
is currently reading its body from aSocketChannel
.Transitions to
READING_BODY
orGETTING
can be triggered by repeatedly callingIBuffer.startGetting(SocketChannel)
until it returns aByteBuffer
that can be used for getting data.A transition to
INITIAL
can be triggered by callingIBuffer.clear()
. -
GETTING
Indicates that theIBuffer
can provide aByteBuffer
that can be used for getting data.A transition to
INITIAL
can be triggered by callingIBuffer.clear()
. -
RELEASED
Indicates that theIBuffer
is owned by itsIBufferProvider
.- Since:
- 3.0
-
DISPOSED
Indicates that theIBuffer
can not be used anymore.- Since:
- 3.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-