Class QuicConnectionCloseEvent

  • All Implemented Interfaces:
    QuicEvent

    public final class QuicConnectionCloseEvent
    extends java.lang.Object
    implements QuicEvent
    Event that is generated if the remote peer sends a CLOSE_CONNECTION frame. This allows to inspect the various details of the cause of the close.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int error()
      Return the error that was provided for the close.
      static int extractTlsError​(int error)
      Extract the contained TLS error from the QUIC error.
      boolean isApplicationClose()
      Return true if this was an application close, false otherwise.
      boolean isTlsError()
      Returns true if a TLS error is contained.
      byte[] reason()
      Returns the reason for the close, which may be empty if no reason was given as part of the close.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • isApplicationClose

        public boolean isApplicationClose()
        Return true if this was an application close, false otherwise.
        Returns:
        if this is an application close.
      • error

        public int error()
        Return the error that was provided for the close.
        Returns:
        the error.
      • isTlsError

        public boolean isTlsError()
        Returns true if a TLS error is contained.
        Returns:
        true if this is an TLS error, false otherwise.
      • reason

        public byte[] reason()
        Returns the reason for the close, which may be empty if no reason was given as part of the close.
        Returns:
        the reason.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • extractTlsError

        public static int extractTlsError​(int error)
        Extract the contained TLS error from the QUIC error. If the given QUIC error does not contain a TLS error it will return -1.
        Parameters:
        error - the QUIC error
        Returns:
        the TLS error or -1 if there was no TLS error contained.