Class MessageHandlerTask
java.lang.Object
com.inductiveautomation.ignition.common.script.message.MessageHandlerTask
Holds everything needed to execute a MessageHandler runnable. Pass an instance of this to a runnable configured with
message parameters.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageHandlerTask
(MessageHandlerManager messageManager, String projectName, MessageHandlerKey key, ScriptManager manager, IScriptsEnabled scriptsEnabled, String code) -
Method Summary
Modifier and TypeMethodDescriptionorg.python.core.PyCode
Returns the user-provided Jython script codeboolean
Returns true if a previous attempt to compile the code has failedboolean
void
reportExecution
(MessageHandlerKey key, ScriptExecutionReport report) Updates the execution status of a MessageHandlerRunnablevoid
setCompiledJyCode
(org.python.core.PyCode compiledJyCode) void
setDontCompile
(boolean dontCompile) Set to true if an attempt to compile the code has failedvoid
setLastRunErrMsg
(String lastRunErrMsg)
-
Constructor Details
-
MessageHandlerTask
public MessageHandlerTask(MessageHandlerManager messageManager, String projectName, MessageHandlerKey key, ScriptManager manager, IScriptsEnabled scriptsEnabled, String code)
-
-
Method Details
-
getMessageHandlerManager
-
getProjectName
-
getScriptCode
Returns the user-provided Jython script code -
getMessageHandlerKey
-
getCompiledJyCode
public org.python.core.PyCode getCompiledJyCode() -
setCompiledJyCode
public void setCompiledJyCode(org.python.core.PyCode compiledJyCode) -
isDontCompile
public boolean isDontCompile()Returns true if a previous attempt to compile the code has failed -
setDontCompile
public void setDontCompile(boolean dontCompile) Set to true if an attempt to compile the code has failed -
getScriptManager
-
isScriptsEnabled
public boolean isScriptsEnabled()- Returns:
- true if: ((FPMISystem.getMode() == FPMISystem.Mode.PREVIEW && !FPMISystem.isSerializing()) OR (FPMISystem.getMode() == FPMISystem.Mode.RUNTIME && FPMISystem.isLoggedIn()))
-
getLastRunErrMsg
-
setLastRunErrMsg
-
reportExecution
Updates the execution status of a MessageHandlerRunnable
-