Package com.oorian

Class ConnectionCloseInfo

java.lang.Object
com.oorian.ConnectionCloseInfo

public class ConnectionCloseInfo extends Object
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 Details

    • ConnectionCloseInfo

      public ConnectionCloseInfo(int closeCode, String reasonPhrase)
      Constructs a new ConnectionCloseInfo with the specified close code and reason.
      Parameters:
      closeCode - the WebSocket close status code
      reasonPhrase - the human-readable reason for the close
  • Method Details

    • getCloseCode

      public int getCloseCode()
      Returns the WebSocket close status code.
      Returns:
      the close code
    • getReasonPhrase

      public String getReasonPhrase()
      Returns the human-readable reason for the close.
      Returns:
      the reason phrase