Enum ServiceEvent
- java.lang.Object
-
- java.lang.Enum<ServiceEvent>
-
- org.simpleframework.http.socket.service.ServiceEvent
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ServiceEvent>
public enum ServiceEvent extends java.lang.Enum<ServiceEvent>
TheServiceEvent
enumeration contains the events that are dispatched processing a WebSocket. To see how a WebSocket is behaving and to gather performance statistics the service events can be intercepted using a customTraceAnalyzer
object.- See Also:
TraceAnalyzer
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISPATCH_SOCKET
This event is dispatched when a WebSocket is dispatched.ERROR
This event is dispatched when an error occurs with a WebSocket.OPEN_SOCKET
This event is dispatched when a WebSocket is connected.PING_EXPIRED
This indicates that there has been no response to a ping.PONG_RECEIVED
This indicates that there has been no response to a ping.READ_FRAME
This event is dispatched when a frame is read from a WebSocket.READ_PING
This event is dispatched when the WebSocket receives a ping.READ_PONG
This event is dispatched when the WebSocket receives a pong.TERMINATE_SOCKET
This event is dispatched when a WebSocket channel is closed.WRITE_FRAME
This event is dispatched when a frame is sent over a WebSocket.WRITE_HEADER
This event is dispatched when the response handshake is sent.WRITE_PING
This event is dispatched when a ping is sent over a WebSocket.WRITE_PONG
This event is dispatched when a pong is sent over a WebSocket.
-
Constructor Summary
Constructors Modifier Constructor Description private
ServiceEvent()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServiceEvent
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ServiceEvent[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPEN_SOCKET
public static final ServiceEvent OPEN_SOCKET
This event is dispatched when a WebSocket is connected.
-
DISPATCH_SOCKET
public static final ServiceEvent DISPATCH_SOCKET
This event is dispatched when a WebSocket is dispatched.
-
TERMINATE_SOCKET
public static final ServiceEvent TERMINATE_SOCKET
This event is dispatched when a WebSocket channel is closed.
-
WRITE_HEADER
public static final ServiceEvent WRITE_HEADER
This event is dispatched when the response handshake is sent.
-
READ_PING
public static final ServiceEvent READ_PING
This event is dispatched when the WebSocket receives a ping.
-
WRITE_PING
public static final ServiceEvent WRITE_PING
This event is dispatched when a ping is sent over a WebSocket.
-
READ_PONG
public static final ServiceEvent READ_PONG
This event is dispatched when the WebSocket receives a pong.
-
WRITE_PONG
public static final ServiceEvent WRITE_PONG
This event is dispatched when a pong is sent over a WebSocket.
-
READ_FRAME
public static final ServiceEvent READ_FRAME
This event is dispatched when a frame is read from a WebSocket.
-
WRITE_FRAME
public static final ServiceEvent WRITE_FRAME
This event is dispatched when a frame is sent over a WebSocket.
-
PING_EXPIRED
public static final ServiceEvent PING_EXPIRED
This indicates that there has been no response to a ping.
-
PONG_RECEIVED
public static final ServiceEvent PONG_RECEIVED
This indicates that there has been no response to a ping.
-
ERROR
public static final ServiceEvent ERROR
This event is dispatched when an error occurs with a WebSocket.
-
-
Method Detail
-
values
public static ServiceEvent[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ServiceEvent c : ServiceEvent.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ServiceEvent valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-