Module bus.http

Class CoverCall.Close

java.lang.Object
org.miaixz.bus.http.plugin.httpv.CoverCall.Close
Enclosing class:
CoverCall

public static class CoverCall.Close extends Object
Encapsulates information about a WebSocket closure.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Custom status code indicating the WebSocket was canceled by the client.
    static final int
    Custom status code indicating the WebSocket was closed due to an unexpected exception.
    static final int
    Custom status code indicating the WebSocket was closed due to a network error.
    static final int
    Custom status code indicating the WebSocket was closed due to a timeout.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Close(int code, String reason)
    Constructs a new Close event object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • CANCELED

      public static final int CANCELED
      Custom status code indicating the WebSocket was canceled by the client.
      See Also:
    • EXCEPTION

      public static final int EXCEPTION
      Custom status code indicating the WebSocket was closed due to an unexpected exception.
      See Also:
    • NETWORK_ERROR

      public static final int NETWORK_ERROR
      Custom status code indicating the WebSocket was closed due to a network error.
      See Also:
    • TIMEOUT

      public static final int TIMEOUT
      Custom status code indicating the WebSocket was closed due to a timeout.
      See Also:
  • Constructor Details

    • Close

      public Close(int code, String reason)
      Constructs a new Close event object.
      Parameters:
      code - The closing status code.
      reason - The reason for closing.
  • Method Details

    • getCode

      public int getCode()
      Returns:
      The closing status code.
    • getReason

      public String getReason()
      Returns:
      The reason for closing.
    • isCanceled

      public boolean isCanceled()
      Returns:
      True if the WebSocket was closed due to cancellation.
    • isException

      public boolean isException()
      Returns:
      True if the WebSocket was closed due to an exception.
    • isNetworkError

      public boolean isNetworkError()
      Returns:
      True if the WebSocket was closed due to a network error.
    • isTimeout

      public boolean isTimeout()
      Returns:
      True if the WebSocket was closed due to a network timeout.
    • toString

      public String toString()
      Overrides:
      toString in class Object