Top Description Fields Constructors Methods
io.undertow.websockets.core

public Class CloseMessage

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, java.nio.charset.StandardCharsets

A close message
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private final String
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
CloseMessage(final ByteBuffer buffer)

public
CloseMessage(int code, String reason)

public
CloseMessage(final ByteBuffer[] buffers)

Method Summary

Modifier and TypeMethod and Description
public int
public String
public static boolean
isValid(int code)

Return true if the provided code is a valid close status code.

public ByteBuffer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

codeback to summary
private final int code
GOING_AWAYback to summary
public static final int GOING_AWAY
MISSING_EXTENSIONSback to summary
public static final int MISSING_EXTENSIONS
MSG_CONTAINS_INVALID_DATAback to summary
public static final int MSG_CONTAINS_INVALID_DATA
MSG_TOO_BIGback to summary
public static final int MSG_TOO_BIG
MSG_VIOLATES_POLICYback to summary
public static final int MSG_VIOLATES_POLICY
NORMAL_CLOSUREback to summary
public static final int NORMAL_CLOSURE
PROTOCOL_ERRORback to summary
public static final int PROTOCOL_ERROR
reasonback to summary
private final String reason
UNEXPECTED_ERRORback to summary
public static final int UNEXPECTED_ERROR
WRONG_CODEback to summary
public static final int WRONG_CODE

Constructor Detail

CloseMessageback to summary
public CloseMessage(final ByteBuffer buffer)
CloseMessageback to summary
public CloseMessage(int code, String reason)
CloseMessageback to summary
public CloseMessage(final ByteBuffer[] buffers)

Method Detail

getCodeback to summary
public int getCode()
getReasonback to summary
public String getReason()
isValidback to summary
public static boolean isValid(int code)

Return true if the provided code is a valid close status code.

toByteBufferback to summary
public ByteBuffer toByteBuffer()