|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.interfaceware.iguana.plugin.DestinationMessageReceivedEventOutputs
public class DestinationMessageReceivedEventOutputs
This class is used to send response data from messageReceived
event handlers back to
Iguana.
Destination plugins are provided with an instance of this class as an
argument to their messageReceived
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 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 ResendMessageFlag
and 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 StopChannelFlag
, StopChannelErrorFlag
and StopChannelReason
properties.
The plugin event handler may add log messages to Iguana's logs using the
addErrorLogMessage
, addWarningLogMessage
, addInfoLogMessage
and
addDebugLogMessage
methods.
Constructor Summary | |
---|---|
DestinationMessageReceivedEventOutputs()
|
|
DestinationMessageReceivedEventOutputs(long Handle)
|
Method Summary | |
---|---|
void |
addDebugLogMessage(java.lang.String DebugLogMessage)
Adds a debug log message to Iguana's logs. |
void |
addErrorLogMessage(java.lang.String ErrorLogMessage)
Adds an error log message to Iguana's logs. |
void |
addInfoLogMessage(java.lang.String InfoLogMessage)
Adds an info log message to Iguana's logs. |
void |
addWarningLogMessage(java.lang.String WarningLogMessage)
Adds a warning log message to Iguana's logs. |
protected void |
finalize()
|
boolean |
getMessageProcessedFlag()
Indicates to Iguana whether or not the message was processed by the plugin. |
int |
getResendMessageDelay()
Specifies the delay time in milliseconds that Iguana should wait before resending the message. |
boolean |
getResendMessageFlag()
Requests that Iguana resend the message. |
boolean |
getStopChannelErrorFlag()
When combined with StopChannelFlag ,
requests that Iguana stop the channel with the channel status set to 'error'. |
boolean |
getStopChannelFlag()
Requests that Iguana stop the channel to which the plugin is connected. |
java.lang.String |
getStopChannelReason()
Describes the reason for the 'stop channel' request. |
void |
release()
|
void |
setMessageProcessedFlag(boolean Value)
Set method for MessageProcessedFlag. |
void |
setResendMessageDelay(int Value)
Set method for ResendMessageDelay. |
void |
setResendMessageFlag(boolean Value)
Set method for ResendMessageFlag. |
void |
setStopChannelErrorFlag(boolean Value)
Set method for StopChannelErrorFlag. |
void |
setStopChannelFlag(boolean Value)
Set method for StopChannelFlag. |
void |
setStopChannelReason(java.lang.String Value)
Set method for StopChannelReason. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DestinationMessageReceivedEventOutputs() throws PluginException
PluginException
public DestinationMessageReceivedEventOutputs(long Handle) throws PluginException
PluginException
Method Detail |
---|
public void release() throws PluginException
PluginException
protected void finalize() throws PluginException
finalize
in class java.lang.Object
PluginException
public boolean getMessageProcessedFlag() throws PluginException
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 addErrorLogMessage
method instead.
See also the setMessageProcessedFlag
method.
PluginException
public void setMessageProcessedFlag(boolean Value) throws PluginException
Set method for MessageProcessedFlag.
See MessageProcessedFlag
.
Value
- Value to set MessageProcessedFlag to.
PluginException
public boolean getResendMessageFlag() throws PluginException
Requests that Iguana resend the message.
Default value: false.
The message will be resent after the delay specified by ResendMessageDelay
.
If the channel is stopped, the message will be resent once the channel is restarted.
See also the setResendMessageFlag
method.
PluginException
public void setResendMessageFlag(boolean Value) throws PluginException
Set method for ResendMessageFlag.
See ResendMessageFlag
.
Value
- Value to set ResendMessageFlag to.
PluginException
public int getResendMessageDelay() throws PluginException
Specifies the delay time in milliseconds that Iguana should wait before resending the message.
Default value: 0 milliseconds.
Only applicable if ResendMessageFlag
is set to true.
See also the setResendMessageDelay
method.
PluginException
public void setResendMessageDelay(int Value) throws PluginException
Set method for ResendMessageDelay.
See ResendMessageDelay
.
Value
- Value to set ResendMessageDelay to.
PluginException
public boolean getStopChannelFlag() throws PluginException
Requests that Iguana stop the channel to which the plugin is connected.
Default value: false.
See also: StopChannelErrorFlag
and StopChannelReason
.
See also the setStopChannelFlag
method.
PluginException
public void setStopChannelFlag(boolean Value) throws PluginException
Set method for StopChannelFlag.
See StopChannelFlag
.
Value
- Value to set StopChannelFlag to.
PluginException
public boolean getStopChannelErrorFlag() throws PluginException
When combined with StopChannelFlag
,
requests that Iguana stop the channel with the channel status set to 'error'.
Default value: false.
Only applicable if StopChannelFlag
is
set to true.
See also the setStopChannelErrorFlag
method.
PluginException
public void setStopChannelErrorFlag(boolean Value) throws PluginException
Set method for StopChannelErrorFlag.
See StopChannelErrorFlag
.
Value
- Value to set StopChannelErrorFlag to.
PluginException
public java.lang.String getStopChannelReason() throws PluginException
Describes the reason for the 'stop channel' request.
Only applicable if StopChannelFlag
is
set to true.
See also the setStopChannelReason
method.
PluginException
public void setStopChannelReason(java.lang.String Value) throws PluginException
Set method for StopChannelReason.
See StopChannelReason
.
Value
- Value to set StopChannelReason to.
PluginException
public void addErrorLogMessage(java.lang.String ErrorLogMessage) throws PluginException
Adds an error log message to Iguana's logs.
ErrorLogMessage
- Log message text.
PluginException
public void addWarningLogMessage(java.lang.String WarningLogMessage) throws PluginException
Adds a warning log message to Iguana's logs.
WarningLogMessage
- Log message text.
PluginException
public void addInfoLogMessage(java.lang.String InfoLogMessage) throws PluginException
Adds an info log message to Iguana's logs.
InfoLogMessage
- Log message text.
PluginException
public void addDebugLogMessage(java.lang.String DebugLogMessage) throws PluginException
Adds a debug log message to Iguana's logs.
DebugLogMessage
- Log message text.
PluginException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |