Class PlccomMqttClientFactory
- java.lang.Object
-
- com.plccom.mqtt.client.PlccomMqttClientFactory
-
public final class PlccomMqttClientFactory extends Object
Factory for PLCcom MQTT clients.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlccomMqttClientBuilderbuilder(String user, String serial)Creates a high-level client builder and applies PLCcom license information.static PlccomMqttClientcreate(PlccomMqttClientOptions options)Creates a synchronous MQTT client.static StringgetLicenceMessage()Returns the current PLCcom client license message.static voidsetLicenseInformation(String user, String serial)Applies PLCcom license information for high-level client convenience operations.
-
-
-
Method Detail
-
create
public static PlccomMqttClient create(PlccomMqttClientOptions options)
Creates a synchronous MQTT client.- Parameters:
options- client options- Returns:
- client instance
- Throws:
NullPointerException- ifoptionsisnull
-
builder
public static PlccomMqttClientBuilder builder(String user, String serial)
Creates a high-level client builder and applies PLCcom license information.This is the preferred entry point for the licensed high-level client API. The lower-level
create(PlccomMqttClientOptions)method remains available for components that intentionally use only prepared options and protocol value objects.- Parameters:
user- user name from the PLCcom license informationserial- serial code from the PLCcom license information- Returns:
- client builder with license information applied
- Throws:
NullPointerException- ifuserorserialisnull
-
setLicenseInformation
public static void setLicenseInformation(String user, String serial)
Applies PLCcom license information for high-level client convenience operations.Use this method when application code creates a client through the lower-level
create(PlccomMqttClientOptions)path but still wants to use licensed high-level helpers such asPlccomMqttClient.publish(String, String),PlccomMqttClient.subscribe(String)orPlccomMqttClient.async().Evaluation mode: pass two empty strings to run for 15 minutes during a debug session with full functionality. For uninterrupted work generate a free trial license (14 days): https://www.indi-an.com/en/plccom/mqtt/mqtt-download/
- Parameters:
user- user name from the PLCcom license informationserial- serial code from the PLCcom license information- Throws:
NullPointerException- ifuserorserialisnull
-
getLicenceMessage
public static String getLicenceMessage()
Returns the current PLCcom client license message.- Returns:
- human-readable license message
-
-