Class MQTTMessageProducerWorkflowAction
- All Implemented Interfaces:
de.uplanet.lucy.server.workflow.authentication.INeedCredentialSupplier
,de.uplanet.lucy.server.workflow.authentication.INeedPasswordSupplier
,IActivatableWorkflowObject
,INamedWorkflowObject
,de.uplanet.lucy.server.workflow.INeedParameterProvider
,INeedWorkflow
,IWorkflowAction
,IWorkflowObject
,Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
Constructor Summary
Constructors -
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.de.uplanet.lucy.server.parameterstore.IParameterProvider
void
internalSetParameterProvider
(de.uplanet.lucy.server.parameterstore.IParameterProvider p_pp) void
internalSetPasswordSupplier
(de.uplanet.lucy.server.workflow.authentication.IPasswordSupplier p_passwordSupplier) 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
setClientIdParamRef
(String p_strParamRef) 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
setServerUriParamRef
(String p_strParamRef) void
Set the topic name;void
setTopicContextVariableName
(String p_strContextVariableName) Set the name of a context variable that contains the topic name.void
setTopicParamRef
(String p_strParamRef) void
setUserName
(String p_strUserName) Set the user identity that used when creating the MQTT connection.void
setUserNameParamRef
(String p_strParamRef) 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
-
internalSetParameterProvider
public void internalSetParameterProvider(de.uplanet.lucy.server.parameterstore.IParameterProvider p_pp) - Specified by:
internalSetParameterProvider
in interfacede.uplanet.lucy.server.workflow.INeedParameterProvider
-
internalGetParameterProvider
public de.uplanet.lucy.server.parameterstore.IParameterProvider internalGetParameterProvider()- Specified by:
internalGetParameterProvider
in interfacede.uplanet.lucy.server.workflow.INeedParameterProvider
-
getServerUri
Get the server URI.- Returns:
- The server URI.
-
setServerUri
Set the server URI.- Parameters:
p_strServerUri
- The server URI.
-
getServerUriParamRef
-
setServerUriParamRef
-
getTopic
Get the topic name;- Returns:
- The topic name.
-
setTopic
Set the topic name;- Parameters:
p_strTopicName
- The topic name.
-
getTopicParamRef
-
setTopicParamRef
-
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.
-
getClientIdParamRef
-
setClientIdParamRef
-
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.
-
getUserNameParamRef
-
setUserNameParamRef
-
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.
-
internalSetPasswordSupplier
public void internalSetPasswordSupplier(de.uplanet.lucy.server.workflow.authentication.IPasswordSupplier p_passwordSupplier) - Specified by:
internalSetPasswordSupplier
in interfacede.uplanet.lucy.server.workflow.authentication.INeedPasswordSupplier
-
internalGetPassword
- Specified by:
internalGetPassword
in interfacede.uplanet.lucy.server.workflow.authentication.INeedPasswordSupplier
-
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.- Specified by:
process
in interfaceIWorkflowAction
- 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
-