Package com.plccom.mqtt.client
Class PlccomMqttClientEnhancedAuthResponse
- java.lang.Object
-
- com.plccom.mqtt.client.PlccomMqttClientEnhancedAuthResponse
-
public final class PlccomMqttClientEnhancedAuthResponse extends Object
Response returned by a client-side MQTT 5 enhanced authentication handler.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PlccomMqttClientEnhancedAuthResponsecontinueWith(String authenticationMethod, byte[] authenticationData)Creates the next client AUTH response for an MQTT 5 enhanced authentication exchange.byte[]getAuthenticationData()Returns a defensive copy of the MQTT 5 Authentication Data to send.StringgetAuthenticationMethod()Returns the MQTT 5 Authentication Method to send in the AUTH response.
-
-
-
Method Detail
-
continueWith
public static PlccomMqttClientEnhancedAuthResponse continueWith(String authenticationMethod, byte[] authenticationData)
Creates the next client AUTH response for an MQTT 5 enhanced authentication exchange.- Parameters:
authenticationMethod- MQTT 5 Authentication Method to send back to the broker; this normally matches the method received from the brokerauthenticationData- MQTT 5 Authentication Data to send, ornullfor no data- Returns:
- response object
- Throws:
NullPointerException- ifauthenticationMethodisnullIllegalArgumentException- ifauthenticationMethodis empty
-
getAuthenticationMethod
public String getAuthenticationMethod()
Returns the MQTT 5 Authentication Method to send in the AUTH response.- Returns:
- authentication method, never
null
-
getAuthenticationData
public byte[] getAuthenticationData()
Returns a defensive copy of the MQTT 5 Authentication Data to send.- Returns:
- authentication data, or
nullwhen no data should be sent
-
-