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 ConstantsEnum ConstantDescriptionIndicates that theIBuffercan not be used anymore.Indicates that theIBuffercan provide aByteBufferthat can be used for getting data.Indicates that theIBufferhas just been provided by itsIBufferProvideror that is has been used and subsequentlycleared.Indicates that theIBuffercan provide aByteBufferthat can be used for putting data.Indicates that theIBufferis currently reading its body from aSocketChannel.Indicates that theIBufferis currently reading its header from aSocketChannel.Indicates that theIBufferis owned by itsIBufferProvider.Indicates that theIBufferis currently writing its data to aSocketChannel. -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferStateReturns 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 theIBufferhas just been provided by itsIBufferProvideror that is has been used and subsequentlycleared.A transition to
PUTTINGcan be triggered by callingIBuffer.startPutting(short)once. If the buffer is intended to be passed to anIChannellater thechannel indexof that Channel has to be passed because it is part of the buffer's header. AByteBufferis returned that can be used for putting data.A transition to
GETTINGcan be triggered by callingIBuffer.startGetting(SocketChannel)repeatedly until it finally returns aByteBufferthat can be used for getting data. -
PUTTING
Indicates that theIBuffercan provide aByteBufferthat can be used for putting data.A transition to
WRITINGcan be triggered by callingIBuffer.write(SocketChannel).A transition to
GETTINGcan be triggered by callingIBuffer.flip().A transition to
INITIALcan be triggered by callingIBuffer.clear(). -
WRITING
Indicates that theIBufferis currently writing its data to aSocketChannel.Self transitions to
WRITINGcan be triggered by repeatedly callingIBuffer.write(SocketChannel)until it returnstrue.A transition to
INITIALcan be triggered by callingIBuffer.clear(). -
READING_HEADER
Indicates that theIBufferis currently reading its header from aSocketChannel.Transitions to
READING_HEADER,READING_BODYorGETTINGcan be triggered by repeatedly callingIBuffer.startGetting(SocketChannel)until it returns aByteBufferthat can be used for getting data.A transition to
INITIALcan be triggered by callingIBuffer.clear(). -
READING_BODY
Indicates that theIBufferis currently reading its body from aSocketChannel.Transitions to
READING_BODYorGETTINGcan be triggered by repeatedly callingIBuffer.startGetting(SocketChannel)until it returns aByteBufferthat can be used for getting data.A transition to
INITIALcan be triggered by callingIBuffer.clear(). -
GETTING
Indicates that theIBuffercan provide aByteBufferthat can be used for getting data.A transition to
INITIALcan be triggered by callingIBuffer.clear(). -
RELEASED
Indicates that theIBufferis owned by itsIBufferProvider.- Since:
- 3.0
-
DISPOSED
Indicates that theIBuffercan 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
-