public class MessageHandlerManager
extends java.lang.Object
Constructor and Description |
---|
MessageHandlerManager(java.lang.String projectName,
ScriptManager manager,
IScriptsEnabled scriptsEnabled,
java.util.Map<MessageHandlerKey,java.lang.String> messageHandlerScripts) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ProjectScriptDiagnostic> |
getScriptDiagnostics() |
java.util.List<ScriptExecutionReport> |
getScriptExecutionReports()
Returns a list of ScriptExecution reports, which gives the status of the last known state of all the
message handlers.
|
void |
processMessage(java.lang.String handlerName,
org.python.core.PyDictionary messagePayload)
Overload for backwards compatibility.
|
void |
processMessage(java.lang.String handlerName,
org.python.core.PyDictionary messagePayload,
java.util.Properties filterParams)
Runs the Jython script that is defined in the specified message handler of this client/gateway.
|
void |
processRequest(java.lang.String handlerName,
org.python.core.PyDictionary messagePayload,
MessageResultHandler resultHandlers)
Overload for backwards compatibility.
|
void |
processRequest(java.lang.String handlerName,
org.python.core.PyDictionary messagePayload,
MessageResultHandler resultHandler,
java.util.Properties filterParams)
Runs the Jython script that is defined in the specified message handler of this client/gateway.
|
void |
reportExecution(MessageHandlerKey key,
ScriptExecutionReport report)
Called by MessageHanderRunnables every time one starts executing.
|
void |
shutdown() |
public MessageHandlerManager(java.lang.String projectName, ScriptManager manager, IScriptsEnabled scriptsEnabled, java.util.Map<MessageHandlerKey,java.lang.String> messageHandlerScripts)
messageHandlerScripts
- %lt;MessageHandlerKey, String scriptCode>public void processMessage(java.lang.String handlerName, org.python.core.PyDictionary messagePayload) throws MessageHandlerException
MessageHandlerException
public void processMessage(java.lang.String handlerName, org.python.core.PyDictionary messagePayload, java.util.Properties filterParams) throws MessageHandlerException
handlerName
- is required. An exception is thrown if the message handler name is null or the specified
handler does not exist.messagePayload
- is required. Pass an empty dictionary if there are no parameters.filterParams
- may be null. Used to transport zone/roles of originatorMessageHandlerException
- if message handler does not exist or required permissions not met.public void processRequest(java.lang.String handlerName, org.python.core.PyDictionary messagePayload, MessageResultHandler resultHandlers) throws MessageHandlerException
MessageHandlerException
public void processRequest(@Nonnull java.lang.String handlerName, @Nonnull org.python.core.PyDictionary messagePayload, @Nullable MessageResultHandler resultHandler, @Nullable java.util.Properties filterParams) throws MessageHandlerException
handlerName
- is required. An exception is thrown if the message handler name is null or the specified
handler does not exist.messagePayload
- is required. Pass an empty dictionary if there are no parameters.resultHandler
- may be null. Handles the request result.filterParams
- may be null. Used to transport zone/roles of originatorMessageHandlerException
- if message handler does not exist or required permissions not met.public void shutdown()
public void reportExecution(MessageHandlerKey key, ScriptExecutionReport report)
public java.util.List<ScriptExecutionReport> getScriptExecutionReports()
public java.util.List<ProjectScriptDiagnostic> getScriptDiagnostics()