Package com.oorian
Class ConnectionCloseInfo
java.lang.Object
com.oorian.ConnectionCloseInfo
Framework-level representation of a WebSocket close event, replacing direct use of CloseReason.
This is a simple POJO that holds the close code and reason phrase. The thin Jakarta/J2EE libraries convert from the native CloseReason to this class before passing to framework code.
- Since:
- 2.1
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionCloseInfo(int closeCode, String reasonPhrase) Constructs a new ConnectionCloseInfo with the specified close code and reason. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the WebSocket close status code.Returns the human-readable reason for the close.
-
Constructor Details
-
ConnectionCloseInfo
Constructs a new ConnectionCloseInfo with the specified close code and reason.- Parameters:
closeCode- the WebSocket close status codereasonPhrase- the human-readable reason for the close
-
-
Method Details
-
getCloseCode
public int getCloseCode()Returns the WebSocket close status code.- Returns:
- the close code
-
getReasonPhrase
Returns the human-readable reason for the close.- Returns:
- the reason phrase
-