Interface AuthPacket
-
@Immutable @DoNotImplement public interface AuthPacket
Represents an AUTH packet.- Since:
- 4.3.0, CE 2020.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Optional<@Immutable ByteBuffer>
getAuthenticationData()
The optional authentication data of the AUTH packet.@NotNull Optional<byte[]>
getAuthenticationDataAsArray()
The optional authentication data of the AUTH packet as a byte array.@NotNull String
getAuthenticationMethod()
The authentication method of the AUTH packet.@NotNull AuthReasonCode
getReasonCode()
The reason code of the AUTH packet.@NotNull Optional<String>
getReasonString()
The optional reason string of the AUTH packet.@NotNull UserProperties
getUserProperties()
The user properties of the AUTH packet.
-
-
-
Method Detail
-
getAuthenticationMethod
@NotNull String getAuthenticationMethod()
The authentication method of the AUTH packet.- Returns:
- The authentication method of the AUTH packet.
- Since:
- 4.3.0, CE 2020.1
-
getAuthenticationData
@NotNull Optional<@Immutable ByteBuffer> getAuthenticationData()
The optional authentication data of the AUTH packet.The ByteBuffer returned by this method is
read only
and will throw aReadOnlyBufferException
if handled incorrectly.- Returns:
- An
Optional
containing the authentication data if present. - Since:
- 4.3.0, CE 2020.1
-
getAuthenticationDataAsArray
@NotNull Optional<byte[]> getAuthenticationDataAsArray()
The optional authentication data of the AUTH packet as a byte array.- Returns:
- An
Optional
containing the authentication data if present. - Since:
- 4.3.0, CE 2020.1
-
getReasonCode
@NotNull AuthReasonCode getReasonCode()
The reason code of the AUTH packet.- Returns:
- The reason code of the AUTH packet.
- Since:
- 4.3.0, CE 2020.1
-
getReasonString
@NotNull Optional<String> getReasonString()
The optional reason string of the AUTH packet.- Returns:
- An
Optional
containing the reason string if present. - Since:
- 4.3.0, CE 2020.1
-
getUserProperties
@NotNull UserProperties getUserProperties()
The user properties of the AUTH packet.- Returns:
- The user properties of the AUTH packet.
- Since:
- 4.3.0, CE 2020.1
-
-