Package com.plccom.mqtt.client
Class PlccomMqttClientEnhancedAuthContext
- java.lang.Object
-
- com.plccom.mqtt.client.PlccomMqttClientEnhancedAuthContext
-
public final class PlccomMqttClientEnhancedAuthContext extends Object
Immutable context passed to a client-side MQTT 5 enhanced authentication handler when the broker sends an AUTH challenge.
-
-
Constructor Summary
Constructors Constructor Description PlccomMqttClientEnhancedAuthContext(String authenticationMethod, byte[] authenticationData, int step)Creates a client enhanced authentication context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getAuthenticationData()Returns a defensive copy of the broker's MQTT 5 Authentication Data.StringgetAuthenticationMethod()Returns the MQTT 5 Authentication Method supplied by the broker.intgetStep()Returns the zero-based challenge step within the current CONNECT handshake.
-
-
-
Constructor Detail
-
PlccomMqttClientEnhancedAuthContext
public PlccomMqttClientEnhancedAuthContext(String authenticationMethod, byte[] authenticationData, int step)
Creates a client enhanced authentication context.- Parameters:
authenticationMethod- MQTT 5 Authentication Method from the brokerauthenticationData- MQTT 5 Authentication Data from the broker, ornullwhen the broker did not include datastep- zero-based challenge step within the current CONNECT handshake- Throws:
NullPointerException- ifauthenticationMethodisnullIllegalArgumentException- ifauthenticationMethodis empty orstepis negative
-
-
Method Detail
-
getAuthenticationMethod
public String getAuthenticationMethod()
Returns the MQTT 5 Authentication Method supplied by the broker.- Returns:
- authentication method, never
null
-
getAuthenticationData
public byte[] getAuthenticationData()
Returns a defensive copy of the broker's MQTT 5 Authentication Data.- Returns:
- authentication data, or
nullwhen the broker did not include data
-
getStep
public int getStep()
Returns the zero-based challenge step within the current CONNECT handshake.- Returns:
- challenge step
-
-