Class MQTTMessageProducerWorkflowAction
- All Implemented Interfaces:
IActivatableWorkflowObject
,INamedWorkflowObject
,INeedWorkflow
,IWorkflowAction
,IWorkflowObject
,Serializable
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the client identifier for the MQTT connection.int
Get the connection timeout in seconds.getData()
Get the message data configuration.Get the password that is used when creating the MQTT connection.int
getQos()
Get the quality of service.long
Get the amount of time in milliseconds to allow for existing work to finish before disconnecting.Get the server URI.getTopic()
Get the topic name;Get the name of a context variable that contains the topic name.Get the user identity that used when creating the MQTT connection.boolean
This property determines if it is an error when no data are available at runtime.process
(IWorkflowEvent p_evt, de.uplanet.lucy.server.workflow.IWorkflowProcessingContext p_wfCtx, de.uplanet.lucy.server.IProcessingContext p_ctx) Process a workflow event in the given context.void
setClientId
(String p_strClientId) Set the client identifier for the MQTT connection.void
setConnectionTimeout
(int p_iTimeout) Set the connection timeout in seconds.void
setData
(MQTTMessageProducerWorkflowAction.DataCfg p_dataCfg) Set the message data configuration.void
setNoMessageDataIsError
(boolean p_bNoMessageDataIsError) This property determines if it is an error when no data are available at runtime.void
setPassword
(String p_strPassword) Set the password that is used when creating the MQTT connection.void
setQos
(int p_iQoS) Set the quality of service.void
setQuiesceTimeout
(long p_lTimeout) Set the amount of time in milliseconds to allow for existing work to finish before disconnecting.void
setServerUri
(String p_strServerUri) Set the server URI.void
Set the topic name;void
setTopicContextVariableName
(String p_strContextVariableName) Set the name of a context variable that contains the topic name.void
setUserName
(String p_strUserName) Set the user identity that used when creating the MQTT connection.Methods inherited from class de.uplanet.lucy.server.workflow.action.AbstractWorkflowAction
getAfferentTransition, getEfferentTransition, getGuid, getName, getWorkflow, isActive, setActive, setAfferentTransition, setEfferentTransition, setName, setWorkflow, toString
-
Constructor Details
-
MQTTMessageProducerWorkflowAction
- Parameters:
p_strGuid
- The GUID of the workflow action.- Throws:
IllegalArgumentException
- If the GUID parameter isnull
or if it does not represent a valid GUID.
-
-
Method Details
-
getServerUri
Get the server URI.- Returns:
- The server URI.
-
setServerUri
Set the server URI.- Parameters:
p_strServerUri
- The server URI.
-
getTopic
Get the topic name;- Returns:
- The topic name.
-
setTopic
Set the topic name;- Parameters:
p_strTopicName
- The topic name.
-
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
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
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
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
Get the user identity that used when creating the MQTT connection.- Returns:
- The user identity.
-
setUserName
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
Get the password that is used when creating the MQTT connection.- Returns:
- The password.
-
setPassword
Set the password that is used when creating the MQTT connection.- Parameters:
p_strPassword
- The password.
-
getData
Get the message data configuration.- Returns:
- The message data configuration.
-
setData
Set the message data configuration.- Parameters:
p_dataCfg
- The message data configuration.
-
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, orfalse
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, orfalse
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
-