Class MQTTMessageProducerWorkflowAction

    • Constructor Detail

      • MQTTMessageProducerWorkflowAction

        public MQTTMessageProducerWorkflowAction​(String p_strGuid)
        Parameters:
        p_strGuid - The GUID of the workflow action.
        Throws:
        IllegalArgumentException - If the GUID parameter is null or if it does not represent a valid GUID.
    • Method Detail

      • getServerUri

        public String getServerUri()
        Get the server URI.
        Returns:
        The server URI.
      • setServerUri

        public void setServerUri​(String p_strServerUri)
        Set the server URI.
        Parameters:
        p_strServerUri - The server URI.
      • getTopic

        public String getTopic()
        Get the topic name;
        Returns:
        The topic name.
      • setTopic

        public void setTopic​(String p_strTopicName)
        Set the topic name;
        Parameters:
        p_strTopicName - The topic name.
      • getTopicContextVariableName

        public String getTopicContextVariableName()
        Get the name of a context variable that contains the topic name.
        Returns:
        The name of a context variable that contains the topic name.
      • setTopicContextVariableName

        public void setTopicContextVariableName​(String p_strContextVariableName)
        Set the name of a context variable that contains the topic name.
        Parameters:
        p_strContextVariableName - The name of a context variable that contains the topic name.
      • getQos

        public int getQos()
        Get the quality of service.
        Returns:
        The quality of service.
      • setQos

        public void setQos​(int p_iQoS)
        Set the quality of service.
        Parameters:
        p_iQoS - The quality of service.
      • getClientId

        public String getClientId()
        Get the client identifier for the MQTT connection.

        The default client identifier is prefixed with ix-mqtt-action-OBJECT_GUID.

        Returns:
        The client identifier for the MQTT connection.
      • setClientId

        public void setClientId​(String p_strClientId)
        Set the client identifier for the MQTT connection.

        The default client identifier is prefixed with ix-mqtt-action-OBJECT_GUID.

        Parameters:
        p_strClientId - The client identifier for the MQTT connection.
      • getUserName

        public String getUserName()
        Get the user identity that used when creating the MQTT connection.
        Returns:
        The user identity.
      • setUserName

        public void setUserName​(String p_strUserName)
        Set the user identity that used when creating the MQTT connection.

        If this property is null (default) the default user identity will be used.

        Parameters:
        p_strUserName - The user identity.
      • getPassword

        public String getPassword()
        Get the password that is used when creating the MQTT connection.
        Returns:
        The password.
      • setPassword

        public void setPassword​(String p_strPassword)
        Set the password that is used when creating the MQTT connection.
        Parameters:
        p_strPassword - The password.
      • isNoMessageDataIsError

        public boolean isNoMessageDataIsError()
        This property determines if it is an error when no data are available at runtime.

        If it is an error, an exception is thrown. Otherwise this action does nothing.

        Returns:
        true if it is an error when no data are available, or false otherwise.
      • setNoMessageDataIsError

        public void setNoMessageDataIsError​(boolean p_bNoMessageDataIsError)
        This property determines if it is an error when no data are available at runtime.

        If it is an error, an exception is thrown. Otherwise this action does nothing.

        Parameters:
        p_bNoMessageDataIsError - true if it is an error when no data are available, or false otherwise.
      • getConnectionTimeout

        public int getConnectionTimeout()
        Get the connection timeout in seconds.

        The default value is 5 seconds. A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.

        Returns:
        The connection timeout.
      • setConnectionTimeout

        public void setConnectionTimeout​(int p_iTimeout)
        Set the connection timeout in seconds.

        The default value is 5 seconds. A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.

        Parameters:
        p_iTimeout - The connection timeout.
      • getQuiesceTimeout

        public long getQuiesceTimeout()
        Get the amount of time in milliseconds to allow for existing work to finish before disconnecting. A value of zero or less means the client will not quiesce.
        Returns:
        The quiesce timeout.
      • setQuiesceTimeout

        public void setQuiesceTimeout​(long p_lTimeout)
        Set the amount of time in milliseconds to allow for existing work to finish before disconnecting. A value of zero or less means the client will not quiesce.
        Parameters:
        p_lTimeout - The quiesce timeout.
      • process

        public WorkflowTransition process​(IWorkflowEvent p_evt,
                                          de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx,
                                          de.uplanet.lucy.server.IProcessingContext p_ctx)
                                   throws WorkflowException,
                                          de.uplanet.util.InvalidPropertyException,
                                          de.uplanet.lucy.server.businesslogic.BlException,
                                          org.eclipse.paho.client.mqttv3.MqttException
        Description copied from interface: IWorkflowAction
        Process a workflow event in the given context.

        Normally, a workflow action should return its efferent transition, regardless whether it is active, or not.

        Parameters:
        p_evt - The event to be processed.
        p_wfCtx - The workflow processing context.
        p_ctx - The processing context.
        Returns:
        The efferent transition, or null.
        Throws:
        WorkflowException
        de.uplanet.util.InvalidPropertyException
        de.uplanet.lucy.server.businesslogic.BlException
        org.eclipse.paho.client.mqttv3.MqttException