|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<StreamState>
org.ogf.saga.stream.StreamState
public enum StreamState
SAGA Stream states. Newly created streams start in the NEW state. A
Stream.connect()
call brings it either in state OPEN or ERROR. From
the OPEN state, when an error occurs it goes to state ERROR. When the remote
party closes the connection it goes into state DROPPED, and after a
Stream.close()
call it goes into state CLOSED. CLOSED, DROPPED, and
ERROR are final states: I/O is no longer possible.
Enum Constant Summary | |
---|---|
CLOSED
State of a stream on which Stream.close() was called. |
|
DROPPED
Remote party closed the connection. |
|
ERROR
An error occured on the stream. |
|
NEW
Initial state of a newly constructed stream. |
|
OPEN
State of a connected stream. |
Method Summary | |
---|---|
int |
getValue()
Returns the integer value of this enumeration literal. |
static StreamState |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static StreamState[] |
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 |
---|
public static final StreamState NEW
public static final StreamState OPEN
public static final StreamState CLOSED
Stream.close()
was called.
This is a final state.
public static final StreamState DROPPED
public static final StreamState ERROR
Method Detail |
---|
public static StreamState[] values()
for (StreamState c : StreamState.values()) System.out.println(c);
public static StreamState valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic int getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |