Class MqttConnectContext

  • All Implemented Interfaces:
    org.eclipse.hono.util.ExecutionContext

    public final class MqttConnectContext
    extends org.eclipse.hono.util.MapBasedExecutionContext
    Contains information required during the processing of an MQTT CONNECT packet.
    • Method Detail

      • fromConnectPacket

        public static MqttConnectContext fromConnectPacket​(io.vertx.mqtt.MqttEndpoint endpoint,
                                                           io.opentracing.Span span)
        Creates a new context for a connection attempt.
        Parameters:
        endpoint - The endpoint representing the client's connection attempt.
        span - The OpenTracing root span that is used to track the processing of this context.
        Returns:
        The context.
        Throws:
        NullPointerException - if endpoint or span is null.
      • deviceEndpoint

        public io.vertx.mqtt.MqttEndpoint deviceEndpoint()
        Gets the MQTT endpoint over which the message has been received.
        Returns:
        The endpoint.
      • getTraceSamplingPriority

        public OptionalInt getTraceSamplingPriority()
        Gets the value for the sampling.priority span tag to be used for OpenTracing spans created in connection with this context.
        Returns:
        An OptionalInt containing the value for the sampling.priority span tag or an empty OptionalInt if no priority should be set.
      • setTraceSamplingPriority

        public void setTraceSamplingPriority​(OptionalInt traceSamplingPriority)
        Sets the value for the sampling.priority span tag to be used for OpenTracing spans created in connection with this context.
        Parameters:
        traceSamplingPriority - The OptionalInt containing the sampling.priority span tag value or an empty OptionalInt if no priority should be set.
        Throws:
        NullPointerException - if traceSamplingPriority is null.