#include <IGCdestinationMessageReceivedEventOutputs.h>
Destination plugins are provided with an instance of this class as an argument to their IGCdestination::OnMessageReceived event handler. The event handler uses the properties and methods of the provided instance to craft a suitable response to send back to Iguana. After the event handler returns, the response is sent back to Iguana.
At a minimum, the event handler should set the IGCdestinationMessageReceivedEventOutputs::MessageProcessedFlag property to true to indicate to Iguana that the message was received and processed by the plugin. Setting this property to false will simply result in Iguana logging a generic error message; it will not result in Iguana resending the message or stopping the channel. Plugins can achieve more sophisticated and precise error handling using the properties and methods described below.
If the event handler is unable to complete processing in a timely fashion, it should use the IGCdestinationMessageReceivedEventOutputs::ResendMessageFlag and IGCdestinationMessageReceivedEventOutputs::ResendMessageDelay properties to request that Iguana resend the message. This ensures that Iguana does not time-out the connection to the plugin due to inactivity. The exact duration of the time-out is determined by the Plugin Time field value configured for the To Plugin channel component to which the plugin is connected.
The plugin event handler may request that the Iguana channel be stopped via the IGCdestinationMessageReceivedEventOutputs::StopChannelFlag, IGCdestinationMessageReceivedEventOutputs::StopChannelErrorFlag and IGCdestinationMessageReceivedEventOutputs::StopChannelReason properties.
The plugin event handler may add log messages to Iguana's logs using the IGCdestinationMessageReceivedEventOutputs::AddErrorLogMessage, IGCdestinationMessageReceivedEventOutputs::AddWarningLogMessage, IGCdestinationMessageReceivedEventOutputs::AddInfoLogMessage and IGCdestinationMessageReceivedEventOutputs::AddDebugLogMessage methods.
Public Member Functions | |
IGCdestinationMessageReceivedEventOutputs () | |
Constructor. | |
virtual | ~IGCdestinationMessageReceivedEventOutputs () |
Destructor. | |
IGCdestinationMessageReceivedEventOutputs & | operator= (const IGCdestinationMessageReceivedEventOutputs &Orig) |
Assignment operator. | |
IGCdestinationMessageReceivedEventOutputsHandle | GetHandle () const |
This method is part of the internal implementation of this class and should not be called. | |
IGCboolean | MessageProcessedFlag () const |
Indicates to Iguana whether or not the message was processed by the plugin. | |
void | SetMessageProcessedFlag (IGCboolean Value) |
Set method for MessageProcessedFlag. | |
IGCboolean | ResendMessageFlag () const |
Requests that Iguana resend the message. | |
void | SetResendMessageFlag (IGCboolean Value) |
Set method for ResendMessageFlag. | |
IGCint32 | ResendMessageDelay () const |
Specifies the delay time in milliseconds that Iguana should wait before resending the message. | |
void | SetResendMessageDelay (IGCint32 Value) |
Set method for ResendMessageDelay. | |
IGCboolean | StopChannelFlag () const |
Requests that Iguana stop the channel to which the plugin is connected. | |
void | SetStopChannelFlag (IGCboolean Value) |
Set method for StopChannelFlag. | |
IGCboolean | StopChannelErrorFlag () const |
When combined with IGCdestinationMessageReceivedEventOutputs::StopChannelFlag, requests that Iguana stop the channel with the channel status set to 'error'. | |
void | SetStopChannelErrorFlag (IGCboolean Value) |
Set method for StopChannelErrorFlag. | |
const char * | StopChannelReason () const |
Describes the reason for the 'stop channel' request. | |
void | SetStopChannelReason (const char *Value) |
Set method for StopChannelReason. | |
void | AddErrorLogMessage (const char *ErrorLogMessage) |
Adds an error log message to Iguana's logs. | |
void | AddWarningLogMessage (const char *WarningLogMessage) |
Adds a warning log message to Iguana's logs. | |
void | AddInfoLogMessage (const char *InfoLogMessage) |
Adds an info log message to Iguana's logs. | |
void | AddDebugLogMessage (const char *DebugLogMessage) |
Adds a debug log message to Iguana's logs. |
|
Constructor.
|
|
Destructor.
|
|
Adds a debug log message to Iguana's logs.
|
|
Adds an error log message to Iguana's logs.
|
|
Adds an info log message to Iguana's logs.
|
|
Adds a warning log message to Iguana's logs.
|
|
This method is part of the internal implementation of this class and should not be called.
|
|
Indicates to Iguana whether or not the message was processed by the plugin. Default value: false. Should generally be set by event handlers to true. If set to false, Iguana will simply issue a relatively generic error message. Event handlers can add their own specific error log message to the Iguana logs using the IGCdestinationMessageReceivedEventOutputs::AddErrorLogMessage method instead. See also the IGCdestinationMessageReceivedEventOutputs::SetMessageProcessedFlag method. |
|
Assignment operator.
|
|
Specifies the delay time in milliseconds that Iguana should wait before resending the message. Default value: 0 milliseconds. Only applicable if IGCdestinationMessageReceivedEventOutputs::ResendMessageFlag is set to true. See also the IGCdestinationMessageReceivedEventOutputs::SetResendMessageDelay method. |
|
Requests that Iguana resend the message. Default value: false. The message will be resent after the delay specified by IGCdestinationMessageReceivedEventOutputs::ResendMessageDelay. If the channel is stopped, the message will be resent once the channel is restarted. See also the IGCdestinationMessageReceivedEventOutputs::SetResendMessageFlag method. |
|
Set method for MessageProcessedFlag. See IGCdestinationMessageReceivedEventOutputs::MessageProcessedFlag.
|
|
Set method for ResendMessageDelay. See IGCdestinationMessageReceivedEventOutputs::ResendMessageDelay.
|
|
Set method for ResendMessageFlag. See IGCdestinationMessageReceivedEventOutputs::ResendMessageFlag.
|
|
Set method for StopChannelErrorFlag. See IGCdestinationMessageReceivedEventOutputs::StopChannelErrorFlag.
|
|
Set method for StopChannelFlag. See IGCdestinationMessageReceivedEventOutputs::StopChannelFlag.
|
|
Set method for StopChannelReason. See IGCdestinationMessageReceivedEventOutputs::StopChannelReason.
|
|
When combined with IGCdestinationMessageReceivedEventOutputs::StopChannelFlag, requests that Iguana stop the channel with the channel status set to 'error'. Default value: false. Only applicable if IGCdestinationMessageReceivedEventOutputs::StopChannelFlag is set to true. See also the IGCdestinationMessageReceivedEventOutputs::SetStopChannelErrorFlag method. |
|
Requests that Iguana stop the channel to which the plugin is connected. Default value: false. See also: IGCdestinationMessageReceivedEventOutputs::StopChannelErrorFlag and IGCdestinationMessageReceivedEventOutputs::StopChannelReason. See also the IGCdestinationMessageReceivedEventOutputs::SetStopChannelFlag method. |
|
Describes the reason for the 'stop channel' request. Only applicable if IGCdestinationMessageReceivedEventOutputs::StopChannelFlag is set to true. See also the IGCdestinationMessageReceivedEventOutputs::SetStopChannelReason method. |