Table of Contents

Interface ILinePlugIn2

Namespace
Acuit.Pinpoint.Server
Assembly
Acuit.Pinpoint.Server.Interfaces.dll

Interface for line plug-ins.

public interface ILinePlugIn2

Remarks

Line plug-ins must do the following:

  • Implement this interface.
  • Provide a public constructor with optional injectable dependency parameters (see below).

Line plug-ins can optionally do the following:

  • Provide public settable properties that can be configured via the line configuration.
  • Implement IDisposable. Dispose() will be called when the line is being cleaned up.

The order of processing is as follows:

  1. As the line is being initialized, the line plug-in is created via its public constructor, supplying dependencies as requested.
  2. Any plug-in parameters included in the line configuration are set via the property setters on the newly-created plug-in instance.
  3. Initialize(string, ILineService) is called. The plug-in typically adds event handlers to the passed-in ILineService object.
  4. As the line operates, the plug-in performs its custom behavior.
  5. When the line is shutting down and being cleaned up, if the plug-in implemenets IDisposable, then Dispose() is called.

Dependencies that can be injected include:

Methods

Initialize(string, ILineService)

Tells the plug-in to initialize itself.

void Initialize(string plugInName, ILineService lineService)

Parameters

plugInName string

The plug-in name, as configured in the line configuration.

lineService ILineService

The line services object.

Remarks

If the plug-in's implementation of this method throws an exception, the plug-in will be immediately disposed and not tracked by Acuit Pinpoint Server. However, if the plug-in subscribed to any events before throwing the exception, those subscriptions will stay in effect. Thus, the plug-in should either (1) add error handling within this method to unsubscribe from events (and otherwise undo any initialization) before throwing the exception, or (2) implement IDisposable and perform that cleanup within Dispose().

InvokePlugIn(string, string)

Invokes the plug-in for any custom purpose.

string InvokePlugIn(string methodName, string parameter)

Parameters

methodName string

A name that specifies a method to invoke.

parameter string

A parameter for the method.

Returns

string

Data from the method.

Remarks

This is available to allow a workstation plug-in to interact with the server plug-in.