Package io.netty.handler.codec.quic
Class QuicConnectionCloseEvent
- java.lang.Object
-
- io.netty.handler.codec.quic.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 interror()Return the error that was provided for the close.static intextractTlsError(int error)Extract the containedTLS errorfrom theQUIC error.booleanisApplicationClose()Returntrueif this was an application close,falseotherwise.booleanisTlsError()Returnstrueif 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.StringtoString()
-
-
-
Method Detail
-
isApplicationClose
public boolean isApplicationClose()
Returntrueif this was an application close,falseotherwise.- 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()
Returnstrueif a TLS error is contained.- Returns:
trueif this is anTLS error,falseotherwise.
-
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:
toStringin classjava.lang.Object
-
extractTlsError
public static int extractTlsError(int error)
Extract the containedTLS errorfrom theQUIC error. If the givenQUIC errordoes not contain aTLS errorit will return-1.- Parameters:
error- theQUIC error- Returns:
- the
TLS erroror-1if there was noTLS errorcontained.
-
-