org.simpleframework.http.socket.service
Enum ServiceEvent

java.lang.Object
  extended by java.lang.Enum<ServiceEvent>
      extended by org.simpleframework.http.socket.service.ServiceEvent
All Implemented Interfaces:
Serializable, Comparable<ServiceEvent>

public enum ServiceEvent
extends Enum<ServiceEvent>

The ServiceEvent 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 custom TraceAnalyzer object.

Author:
Niall Gallagher
See Also:
TraceAnalyzer

Enum Constant Summary
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.
 
Method Summary
static ServiceEvent valueOf(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.
 
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

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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2014. All Rights Reserved.