StatusCode

object StatusCode

Provides factory methods and registry for StatusCode.

See also:
Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

object Registry

Contains registered WebSocket status codes.

Contains registered WebSocket status codes.

Note:

The status code descriptions are taken in part from those provided in RFC 6455.

Value members

Concrete methods

def apply(value: Int): StatusCode

Gets registered status code for given value.

Gets registered status code for given value.

Throws:
java.util.NoSuchElementException

if value not registered

def apply(data: Array[Byte]): StatusCode

Gets registered status code for supplied data.

Gets registered status code for supplied data.

Throws:
java.lang.IllegalArgumentException

if data.size != 2

java.util.NoSuchElementException

if value not registered

Note:

The data is converted to two-byte unsigned integer, which is then used to obtain status code.

def get(value: Int): Option[StatusCode]

Gets status code for given value, if registered.

Gets status code for given value, if registered.

def get(data: Array[Byte]): Option[StatusCode]

Gets status code for supplied data, if registered.

Gets status code for supplied data, if registered.

Note:

The data is converted to two-byte unsigned integer, which is then used to obtain status code.