#include <IGCdestination.h>
Destination plugins connect to, and receive messages from Iguana To-Plugin channel components.
Messages are sent from Iguana to the IGCdestination plugin through the IGCdestination::OnMessageReceived event. The plugin must set properties on the IGCdestinationMessageReceivedEventOutputs object that will be passed to event handler. This will indicate to Iguana whether message processing was successful.
See:
http://www.interfaceware.com/manual/plugin_receiving.html
for more information.
Public Member Functions | |
IGCdestination () | |
Constructor. | |
virtual | ~IGCdestination () |
Destructor. | |
IGCdestinationHandle | GetHandle () const |
This method is part of the internal implementation of this class and should not be called. | |
IGCdisconnectReason | DisconnectReason () const |
Describes the reason for the plugin's (most recent) disconnection from Iguana. | |
IGCint32 | ConnectTimeout () const |
Time in milliseconds the plugin will wait to handshake with Iguana while executing the IGCdestination::Connect operation (default 5000 milliseconds). | |
void | SetConnectTimeout (IGCint32 Value) |
Set method for ConnectTimeout. | |
void | EnableDebugLogging (const char *FileName) |
Enables logging of internal runtime debug information to the specified file. | |
void | Connect (const char *HostName, IGCint32 PortNumber, const char *ChannelName) |
Connects to an Iguana To-Plugin channel component as a destination plugin. | |
void | Disconnect () |
Disconnects the plugin from Iguana. | |
void | WaitForDisconnect () |
Waits until the plugin is disconnected from Iguana. | |
IGCboolean | WaitForDisconnectWithTimeout (IGCint32 TimeoutInMilliseconds) |
Waits until either the plugin is disconnected from Iguana, or a specified timeout elapses. | |
virtual void | OnMessageReceived (IGCdestinationMessageReceivedEventInputs &Inputs, IGCdestinationMessageReceivedEventOutputs &Outputs)=0 |
Event raised upon receipt of a message from Iguana. | |
virtual void | OnResubmissionPreviewMessageReceived (IGCdestinationMessageReceivedEventInputs &Inputs, IGCdestinationMessageReceivedEventOutputs &Outputs)=0 |
Event raised upon receipt of a resubmission preview message from Iguana. | |
virtual void | OnDisconnected ()=0 |
Event raised upon disconnection of the plugin from Iguana. |
|
Constructor.
|
|
Destructor.
|
|
Connects to an Iguana To-Plugin channel component as a destination plugin. Normally, this method is called as the plugin starts and is ready to receive data from Iguana or if Iguana has disconnected from the plugin (for example, after returning from a call to IGCdestination::WaitForDisconnect). It may not be called from within an event handler (for example, may not be called from within the IGCdestination::OnDisconnected handler). If a connection is not established within the timeout period specified by IGCdestination::ConnectTimeout, an exception will be thrown. The default timeout period of 5000 milliseconds should suffice for most plugins, and should only be adjusted if connection timeouts are observed. One common point of confusion with users is the choice of port number for this call. This must be the port number for the Plugin Communication Server, which is typically 6123, not the LLP port for the particular plugin channel. Throws: Function throws an exception upon connection failure or timeout, or if called from within an event handler.
|
|
Time in milliseconds the plugin will wait to handshake with Iguana while executing the IGCdestination::Connect operation (default 5000 milliseconds). For a heavily loaded Iguana server running on a slow machine this may need a higher value than the default value. See also the IGCdestination::SetConnectTimeout method. |
|
Disconnects the plugin from Iguana. Results in IGCdestination::DisconnectReason being set to DueToPlugin. |
|
Describes the reason for the plugin's (most recent) disconnection from Iguana. Only valid after the plugin has been disconnected, and before any subsequent connection attempts. Specifically, only valid within the IGCdestination::OnDisconnected handler or after the return of a call to IGCdestination::WaitForDisconnect or IGCdestination::WaitForDisconnectWithTimeout, and before any subsequent calls to IGCdestination::Connect. |
|
Enables logging of internal runtime debug information to the specified file. Must be called before any other methods, and may only be called once per Destination instance. This function should only be used at the request of iNTERFACEWARE Technical Support.
|
|
This method is part of the internal implementation of this class and should not be called.
|
|
Event raised upon disconnection of the plugin from Iguana. Will not be raised for failed connection attempts. Specifically, will not be raised if IGCdestination::Connect throws an exception as a result of a connection failure. Exceptions should never be allowed to propagate out of the event handler. Event handlers should catch and handle all exceptions internally. |
|
Event raised upon receipt of a message from Iguana. Exceptions should never be allowed to propagate out of the event handler. Event handlers should catch and handle all exceptions internally.
|
|
Event raised upon receipt of a resubmission preview message from Iguana. Plugins should simulate the processing that would be performed by the IGCdestination::OnMessageReceived event handler without causing external side effects. For example, database changes should not be made for resubmission preview messages. Exceptions should never be allowed to propagate out of the event handler. Event handlers should catch and handle all exceptions internally.
|
|
Set method for ConnectTimeout. See IGCdestination::ConnectTimeout.
|
|
Waits until the plugin is disconnected from Iguana. May not be called from within an event handler (for example, may not be called from within the IGCdestination::OnDisconnected handler). |
|
Waits until either the plugin is disconnected from Iguana, or a specified timeout elapses. May not be called from within an event handler (for example, may not be called from within the IGCdestination::OnDisconnected handler).
|