Class ThingWebClientUtil

java.lang.Object
org.openhab.core.thing.util.ThingWebClientUtil

@NonNullByDefault public class ThingWebClientUtil extends Object
ThingWebClientUtil provides an utility method to create a valid consumer name for web clients.
Author:
Laurent Garnier - Initial contribution
  • Constructor Details

    • ThingWebClientUtil

      public ThingWebClientUtil()
  • Method Details

    • buildWebClientConsumerName

      public static String buildWebClientConsumerName(ThingUID uid, @Nullable String prefix)
      Build a valid consumer name for HTTP or WebSocket client.
      Parameters:
      uid - thing UID for which to associate HTTP or WebSocket client
      prefix - a prefix to consider for the name; can be null
      Returns:
      a valid consumer name