Class CloseReason
java.lang.Object
jakarta.websocket.CloseReason
Represents the reason for the closure of a WebSocket connection, including a close code
and an optional reason phrase.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents a WebSocket close code.static enumStandard WebSocket close codes as defined by RFC 6455 and related specifications. -
Constructor Summary
ConstructorsConstructorDescriptionCloseReason(CloseReason.CloseCode closeCode, String reasonPhrase) Creates a new CloseReason with the given close code and reason phrase. -
Method Summary
-
Constructor Details
-
CloseReason
Creates a new CloseReason with the given close code and reason phrase.- Parameters:
closeCode- The close codereasonPhrase- The reason phrase explaining the closure
-
-
Method Details
-
getCloseCode
-
getReasonPhrase
-
toString
-