Plugin Development

Plugins are identified by method signature only. While there are ICommandPlugin and IEndpointPlugin interfaces, their usage is not mandatory.

All plugin operations are also cooperative in nature. For example, once engine sends control to any of the plugin methods (e.g., ReceiveAsync), it will wait until control is returned before proceeding.

There are two kinds of plugins: Command and Endpoint.

Command Plugin

The following methods must be defined for all command plugins:

ExecuteAsync Method

This static method will attempt to execute an command.

It accepts the following arguments:

Returns executed nodes.

Method should raise exception in the case of invalid parameters.

Endpoint Plugin

The following methods must be defined for all endpoint plugins:

CreateInstance Method

This static method will return the instance of the endpoint.

It accepts the following arguments:

Returns plugin object.

Method should raise exception in the case of invalid configuration only. No attempt to start endpoint should be done at this time.

StartAsync Method

Starts endpoint processing.

It accepts the following arguments:

Returns nothing.

Method should raise exception in the case endpoint cannot be started.

Exception should be thrown only if configuration is erroneous. Opening of connection should not be done here but in a separate start method.

StartAsync Method

Starts any necessary connection.

SendAsync Method

Attempts to send a message.

It accepts the following arguments:

Returns sent nodes.

Method can raise exceptions.

ReceiveAsync Method

Attempts to receive a message.

It accepts the following arguments:

Return is a tuple containing received message name (messageName) and any data (data).

Method can raise exceptions.

Variable Plugin

The following methods must be defined for all variable plugins:

GetVariableValue Method

This static method will attempt to return a variable value.

It accepts the following arguments:

Returns variable value or null if variable value cannot be determined.

Method should not raise exceptions.