public enum StreamState extends Enum<StreamState>
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 nameNullPointerException
- if the argument is nullpublic int getValue()
Copyright © 2016 Open Grid Forum. All rights reserved.