add convenience method to create websocket config
@@ -27,6 +27,10 @@ public class MqttWebsocketConfigImpl implements MqttWebsocketConfig {
public static final MqttWebsocketConfig DEFAULT = new MqttWebsocketConfigImpl("");
private final String serverPath;
+ public static MqttWebsocketConfig create(@NotNull String serverPath) {
+ return new MqttWebsocketConfigImpl(serverPath);
+ }
+
public MqttWebsocketConfigImpl(@NotNull String serverPath) {
// remove any leading slashes
this.serverPath = serverPath.replaceAll("^/+", "");
