org.atmosphere.wasync
Enum Event

java.lang.Object
  extended by java.lang.Enum<Event>
      extended by org.atmosphere.wasync.Event
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Event>

public enum Event
extends java.lang.Enum<Event>

This class define the type of event a Function or Decoder will be called with.

Author:
Jeanfrancois Arcand

Enum Constant Summary
CLOSE
          This event is fired when the connection gets closed.
ERROR
          This event is fired when unexpected error happens.
HEADERS
          This event is fire when the response's headers is received.
MESSAGE
          This event is fired every time a new message is received.
MESSAGE_BYTES
          This event is fire when the response's bytes are received.
OPEN
          This event is fired when the connection is open.
REOPENED
          This event is fired every time the connection re-opened
STATUS
          This event is fire when the response's status is received.
TRANSPORT
          This event is fire when the connection has been established.
 
Method Summary
static Event valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Event[] 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

public static final Event OPEN
This event is fired when the connection is open. This event is only fired once.


CLOSE

public static final Event CLOSE
This event is fired when the connection gets closed. This event is only fired once.


MESSAGE

public static final Event MESSAGE
This event is fired every time a new message is received.


REOPENED

public static final Event REOPENED
This event is fired every time the connection re-opened


ERROR

public static final Event ERROR
This event is fired when unexpected error happens. This event is only fired once.


STATUS

public static final Event STATUS
This event is fire when the response's status is received. This event is only fired once.


HEADERS

public static final Event HEADERS
This event is fire when the response's headers is received. This event is only fired once.


MESSAGE_BYTES

public static final Event MESSAGE_BYTES
This event is fire when the response's bytes are received.


TRANSPORT

public static final Event TRANSPORT
This event is fire when the connection has been established. The Transport propagated is the one that worked. This event is only fired once.

Method Detail

values

public static Event[] 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 (Event c : Event.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Event 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 name
java.lang.NullPointerException - if the argument is null


Copyright © 2014. All Rights Reserved.