Package ej.websocket

Enum ConnectionStates

    • Enum Constant Detail

      • CONNECTING

        public static final ConnectionStates CONNECTING
        Initial state of the websocket in the RFC6455. The application is "establishing a websocket connection". It Java, the websocket moves to this sate when the WebSocket.connect() method is called.

        See section 4.1. Client Requirements.

      • OPEN

        public static final ConnectionStates OPEN
        State once the opening handshake is done.

        See end of section 4.1. Client Requirements.

      • CLOSING

        public static final ConnectionStates CLOSING
        State "upon either sending or receiving a Close control frame".

        See section 7.1.3. The WebSocket Closing Handshake is Started.

      • CLOSED

        public static final ConnectionStates CLOSED
        State once the underlying TCP connection is closed.

        See section 7.1.4. The WebSocket Connection is Closed.

    • Method Detail

      • values

        public static ConnectionStates[] 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 (ConnectionStates c : ConnectionStates.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ConnectionStates 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