Enum Class SocketEvent
- All Implemented Interfaces:
Serializable
,Comparable<SocketEvent>
,Constable
Defines events that occur per socket that require further processing by the
container. Usually these events are triggered by the socket implementation
but they may be triggered by the container.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA client attempted to establish a connection but failed.The client has disconnected.An error has occurred on a non-container thread and processing needs to return to the container for any necessary clean-up.Data is available to be read.The socket is ready to be written to.The associated Connector/Endpoint is stopping and the connection/socket needs to be closed cleanly.A timeout has occurred and the connection needs to be closed cleanly. -
Method Summary
Modifier and TypeMethodDescriptionstatic SocketEvent
Returns the enum constant of this class with the specified name.static SocketEvent[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OPEN_READ
Data is available to be read. -
OPEN_WRITE
The socket is ready to be written to. -
STOP
The associated Connector/Endpoint is stopping and the connection/socket needs to be closed cleanly. -
TIMEOUT
A timeout has occurred and the connection needs to be closed cleanly. Currently this is only used by the Servlet 3.0 async processing. -
DISCONNECT
The client has disconnected. -
ERROR
An error has occurred on a non-container thread and processing needs to return to the container for any necessary clean-up. Examples of where this is used include:- by NIO2 to signal the failure of a completion handler
- by the container to signal an I/O error on a non-container thread during Servlet 3.0 asynchronous processing.
-
CONNECT_FAIL
A client attempted to establish a connection but failed. Examples of where this is used include:- TLS handshake failures
-
-
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
-