com.interfaceware.iguana.plugin
Class SourceMessageRequestedEventOutputs

java.lang.Object
  extended by com.interfaceware.iguana.plugin.SourceMessageRequestedEventOutputs

public class SourceMessageRequestedEventOutputs
extends java.lang.Object

This class is used to send response data from messageRequested event handlers back to Iguana.

Source plugins are provided with an instance of this class as an argument to their messageRequested 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 OutboundMessage and PluginMessageId properties to appropriate values.

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
SourceMessageRequestedEventOutputs()
           
SourceMessageRequestedEventOutputs(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()
           
 java.lang.String getOutboundMessage()
           Message to send back to Iguana, or an empty string if a message is not presently available.
 java.lang.String getPluginMessageId()
           Id to be assigned by the plugin to uniquely identify OutboundMessage.
 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 setOutboundMessage(java.lang.String Value)
          Set method for OutboundMessage.
 void setPluginMessageId(java.lang.String Value)
          Set method for PluginMessageId.
 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

SourceMessageRequestedEventOutputs

public SourceMessageRequestedEventOutputs()
                                   throws PluginException
Throws:
PluginException

SourceMessageRequestedEventOutputs

public SourceMessageRequestedEventOutputs(long Handle)
                                   throws PluginException
Throws:
PluginException
Method Detail

release

public void release()
             throws PluginException
Throws:
PluginException

finalize

protected void finalize()
                 throws PluginException
Overrides:
finalize in class java.lang.Object
Throws:
PluginException

getOutboundMessage

public java.lang.String getOutboundMessage()
                                    throws PluginException

Message to send back to Iguana, or an empty string if a message is not presently available.

See also the setOutboundMessage method.

Throws:
PluginException

setOutboundMessage

public void setOutboundMessage(java.lang.String Value)
                        throws PluginException

Set method for OutboundMessage.

See OutboundMessage.

Parameters:
Value - Value to set OutboundMessage to.
Throws:
PluginException

getPluginMessageId

public java.lang.String getPluginMessageId()
                                    throws PluginException

Id to be assigned by the plugin to uniquely identify OutboundMessage.

Iguana sends the provided PluginMessageId back to the plugin's messageRequestCompleted event handler via PluginMessageId property. This allows the plugin to associate each message request completed notification with the message sent to Iguana.

The format of the PluginMessageId is to be determined by the plugin author. Iguana does not interpret this value, other than by adding it to logs, and sending it back to the plugin.

See also the setPluginMessageId method.

Throws:
PluginException

setPluginMessageId

public void setPluginMessageId(java.lang.String Value)
                        throws PluginException

Set method for PluginMessageId.

See PluginMessageId.

Parameters:
Value - Value to set PluginMessageId to.
Throws:
PluginException

getStopChannelFlag

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.

Throws:
PluginException

setStopChannelFlag

public void setStopChannelFlag(boolean Value)
                        throws PluginException

Set method for StopChannelFlag.

See StopChannelFlag.

Parameters:
Value - Value to set StopChannelFlag to.
Throws:
PluginException

getStopChannelErrorFlag

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.

Throws:
PluginException

setStopChannelErrorFlag

public void setStopChannelErrorFlag(boolean Value)
                             throws PluginException

Set method for StopChannelErrorFlag.

See StopChannelErrorFlag.

Parameters:
Value - Value to set StopChannelErrorFlag to.
Throws:
PluginException

getStopChannelReason

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.

Throws:
PluginException

setStopChannelReason

public void setStopChannelReason(java.lang.String Value)
                          throws PluginException

Set method for StopChannelReason.

See StopChannelReason.

Parameters:
Value - Value to set StopChannelReason to.
Throws:
PluginException

addErrorLogMessage

public void addErrorLogMessage(java.lang.String ErrorLogMessage)
                        throws PluginException

Adds an error log message to Iguana's logs.

Parameters:
ErrorLogMessage - Log message text.
Throws:
PluginException

addWarningLogMessage

public void addWarningLogMessage(java.lang.String WarningLogMessage)
                          throws PluginException

Adds a warning log message to Iguana's logs.

Parameters:
WarningLogMessage - Log message text.
Throws:
PluginException

addInfoLogMessage

public void addInfoLogMessage(java.lang.String InfoLogMessage)
                       throws PluginException

Adds an info log message to Iguana's logs.

Parameters:
InfoLogMessage - Log message text.
Throws:
PluginException

addDebugLogMessage

public void addDebugLogMessage(java.lang.String DebugLogMessage)
                        throws PluginException

Adds a debug log message to Iguana's logs.

Parameters:
DebugLogMessage - Log message text.
Throws:
PluginException