Class PlccomMqttEndpoint


  • public final class PlccomMqttEndpoint
    extends Object
    MQTT endpoint address.

    The client supports mqtt://, mqtts://, ws:// and wss:// endpoints.

    • Method Detail

      • parse

        public static PlccomMqttEndpoint parse​(String value)
        Parses an MQTT endpoint URI.
        Parameters:
        value - endpoint URI, for example mqtt://localhost:1883
        Returns:
        parsed endpoint
        Throws:
        NullPointerException - if value is null
        IllegalArgumentException - if the URI is malformed, unsupported or contains ignored components such as credentials, query or fragment
      • getScheme

        public String getScheme()
        Returns the URI scheme.
        Returns:
        mqtt, mqtts, ws or wss
      • getHost

        public String getHost()
        Returns the broker host name.
        Returns:
        host name or IP address
      • getPort

        public int getPort()
        Returns the broker port.
        Returns:
        resolved port, including default ports when omitted in the URI
      • getPath

        public String getPath()
        Returns the optional path component.
        Returns:
        raw URI path, or an empty string
      • isSecure

        public boolean isSecure()
        Returns whether this endpoint uses TLS.
        Returns:
        true for mqtts:// and wss://
      • isWebSocket

        public boolean isWebSocket()
        Returns whether this endpoint uses WebSocket transport.
        Returns:
        true for ws:// and wss://
      • toString

        public String toString()
        Returns the endpoint as a normalized URI string.
        Overrides:
        toString in class Object
        Returns:
        normalized endpoint URI