Class MQTTProtocolSupport

  • public class MQTTProtocolSupport
    extends Object
    A set of static methods useful for handling MQTT based client connections.
    • Constructor Detail

      • MQTTProtocolSupport

        public MQTTProtocolSupport()
    • Method Detail

      • convertMQTTToActiveMQ

        public static String convertMQTTToActiveMQ​(String name)
        Converts an MQTT formatted Topic name into a suitable ActiveMQ Destination name string.
        name - the MQTT formatted topic name.
        an destination name that fits the ActiveMQ conventions.
      • convertActiveMQToMQTT

        public static String convertActiveMQToMQTT​(String destinationName)
        Converts an ActiveMQ destination name into a correctly formatted MQTT destination name.
        destinationName - the ActiveMQ destination name to process.
        a destination name formatted for MQTT.
      • commandType

        public static String commandType​(byte header)
        Given an MQTT header byte, determine the command type that the header represents.
        header - the byte value for the MQTT frame header.
        a string value for the given command type.
      • validate

        public static void validate​(String topicName)
                             throws MQTTProtocolException
        Validate that the Topic names given by client commands are valid based on the MQTT protocol specification.
        topicName - the given Topic name provided by the client.
        MQTTProtocolException - if the value given is invalid.