Class MQTTWorkflowEventSource

    • Constructor Detail

      • MQTTWorkflowEventSource

        public MQTTWorkflowEventSource​(String p_strGuid)
    • Method Detail

      • getClusterInfo

        public de.uplanet.lucy.server.workflow.IClusterInfo getClusterInfo()
        Specified by:
        getClusterInfo in interface de.uplanet.lucy.server.workflow.INeedClusterInfo
      • setClusterInfo

        public void setClusterInfo​(de.uplanet.lucy.server.workflow.IClusterInfo p_clusterInfo)
        Specified by:
        setClusterInfo in interface de.uplanet.lucy.server.workflow.INeedClusterInfo
      • getOnErrorRestartWaitTimeout

        public long getOnErrorRestartWaitTimeout()
        Get the time in milliseconds the event source will wait before it tries to restart after an error occurred that prevented it to running the source loop.

        The default value is 60000 milliseconds (one minute).

        Returns:
        The timeout in milliseconds.
      • setOnErrorRestartWaitTimeout

        public void setOnErrorRestartWaitTimeout​(long p_lOnErrorRestartWaitTimeout)
        Set the time in milliseconds the event source will wait before it tries to restart after an error occurred that prevented it to running the source loop.
        Parameters:
        p_lOnErrorRestartWaitTimeout - The timeout in milliseconds.
      • isGlobalSharedState

        public boolean isGlobalSharedState()
        Description copied from interface: ISupportGlobalSharedState
        This property determines if a global shared state should be used for all events created by this event source.
        Specified by:
        isGlobalSharedState in interface ISupportGlobalSharedState
        Returns:
        true if a global shared state should be used, or false otherwise.
      • setGlobalSharedState

        public void setGlobalSharedState​(boolean p_bGlobalSharedState)
        Description copied from interface: ISupportGlobalSharedState
        This property determines if a global shared state should be used for all events created by this event source.
        Specified by:
        setGlobalSharedState in interface ISupportGlobalSharedState
        Parameters:
        p_bGlobalSharedState - true if a global shared state should be used, or false otherwise.
      • isSendBeforeStartEvent

        public boolean isSendBeforeStartEvent()
        Description copied from interface: ISupportBeforeStartEvent
        This property determines if an before-start event should be sent.
        Specified by:
        isSendBeforeStartEvent in interface ISupportBeforeStartEvent
        Returns:
        true if an event should be sent before the workflow object's activity is about to being started, or false otherwise.
      • setSendBeforeStartEvent

        public void setSendBeforeStartEvent​(boolean p_bSendBeforeStartEvent)
        Description copied from interface: ISupportBeforeStartEvent
        This property determines if an before-start event should be sent.
        Specified by:
        setSendBeforeStartEvent in interface ISupportBeforeStartEvent
        Parameters:
        p_bSendBeforeStartEvent - true if an event should be sent before the workflow object's activity is about to being started, or false otherwise.
      • isSendAfterStopEvent

        public boolean isSendAfterStopEvent()
        Description copied from interface: ISupportAfterStopEvent
        This property determines if an after-stop event should be sent.
        Specified by:
        isSendAfterStopEvent in interface ISupportAfterStopEvent
        Returns:
        true if an event should be sent after the workflow object's activity has been stopped, or false otherwise.
      • setSendAfterStopEvent

        public void setSendAfterStopEvent​(boolean p_bSendAfterStopEvent)
        Description copied from interface: ISupportAfterStopEvent
        This property determines if an after-stop event should be sent.
        Specified by:
        setSendAfterStopEvent in interface ISupportAfterStopEvent
        Parameters:
        p_bSendAfterStopEvent - true if an event should be sent after the workflow object's activity has been stopped, or false otherwise.
      • 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.
      • 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.
      • getClientId

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

        The default client identifier is ix-mqtt-consumer-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 ix-mqtt-consumer-OBJECT_GUID.

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

        public boolean isRandomizeClientId()
        This property determines if the client should connect with a unique randomized identifier.

        If true (default) a random suffix will be appended to the client ID that would normally be used.

        Returns:
        true if the client ID is random, or false otherwise.
      • setRandomizeClientId

        public void setRandomizeClientId​(boolean p_bRandomizeClientId)
        This property determines if the client should connect with a unique randomized identifier.

        If true (default) a random suffix will be appended to the client ID that would normally be used.

        Parameters:
        p_bRandomizeClientId - true if the client ID should be random, or false otherwise.
      • 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.
      • isReconnect

        public boolean isReconnect()
        Check whether the client will automatically attempt to reconnect to the server if the connection is lost.

        The default value is true.

        Returns:
        true if the client will attempt to reconnect, or false otherwise.
      • setReconnect

        public void setReconnect​(boolean p_bReconnect)
        Set whether the client will automatically attempt to reconnect to the server if the connection is lost.

        The default value is true.

        Parameters:
        p_bReconnect - true if the client should attempt to reconnect, or false otherwise.
      • isCleanSession

        public boolean isCleanSession()
        Check whether the client and server should remember state across restarts and reconnects.
        Returns:
        true if the state should not be maintained, or false otherwise.
      • setCleanSession

        public void setCleanSession​(boolean p_bCleanSession)
        Set whether the client and server should remember state across restarts and reconnects.
        • If set to false both the client and server will maintain state across restarts of the client, the server and the connection. As state is maintained:
          • Message delivery will be reliable meeting the specified QOS even if the client, server or connection are restarted.
          • The server will treat a subscription as durable.
        • If set to true the client and server will not maintain state across restarts of the client, the server or the connection. This means
          • Message delivery to the specified QOS cannot be maintained if the client, server or connection are restarted.
          • The server will treat a subscription as non-durable.

        The default value is true.

        Parameters:
        p_bCleanSession - true if the state should not be maintained, or false otherwise.
      • getKeepAliveInterval

        public int getKeepAliveInterval()
        Get the keep alive interval.
        Returns:
        The keep alive interval.
      • setKeepAliveInterval

        public void setKeepAliveInterval​(int p_iKeepAliveInterval)
        Set the keep alive interval.

        This value, measured in seconds, defines the maximum time interval between messages received. It enables the client to detect if the server is no longer available, without having to wait for the TCP/IP timeout. The client will ensure that at least one ping message travels across the network within each keep alive period.

        A value of 0 disables keep alive processing in the client.

        Parameters:
        p_iKeepAliveInterval - the keep alive interval in seconds.