Enum Class WebSocketFrameType

java.lang.Object
java.lang.Enum<WebSocketFrameType>
eu.cloudnetservice.driver.network.http.websocket.WebSocketFrameType
All Implemented Interfaces:
Serializable, Comparable<WebSocketFrameType>, Constable

public enum WebSocketFrameType extends Enum<WebSocketFrameType>
All types of web socket frames which are valid to send to a web socket channel. All of these types are defined in RFC 6455 section 5.5 and 5.6.
Since:
4.0
  • Enum Constant Details

    • PING

      public static final WebSocketFrameType PING
      A frame to check if the recipient is still alive. The recipient must answer with a pong frame if no close frame was received previously, returning the same application data as sent in the ping. For more details see RFC-6455, section 5.5.2.
    • PONG

      public static final WebSocketFrameType PONG
      A frame which is a response to a ping. The body of the frame must contain the same data as supplied in the ping. See RFC-6455, section 5.5.3 for more details.
    • TEXT

      public static final WebSocketFrameType TEXT
      A frame which holds text in an utf-8 format in its body. For more information see RFC-6455, section 5.6.
    • CLOSE

      public static final WebSocketFrameType CLOSE
      A frame which indicates the recipient that the connection will be closed, optionally containing a reason text. See RFC-6455, section 5.5.1 for more details.
    • BINARY

      public static final WebSocketFrameType BINARY
      A frame which holds raw binary data in its body, the interpretation of the data is up to the application. For more details see RFC-6455, section 5.6.
  • Constructor Details

    • WebSocketFrameType

      private WebSocketFrameType()
  • Method Details

    • values

      public static WebSocketFrameType[] 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

      public static WebSocketFrameType valueOf(String name)
      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 name
      NullPointerException - if the argument is null