THYServicePluginFactory

Overview

The THYServicePluginFactory factory class is used for Remoting SDK service plugins. This factory is used internally in the Hydra framework to create new instances of the Remoting SDK service plugins.

Location

 

constructor Create    (declared in THYBasePluginFactory)

Creates a new instance of the class.

constructor Create

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, THYCrossPlatformPluginDescriptor)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aDescriptior: THYCrossPlatformPluginDescriptor)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aDescriptior: Reference to a descriptor object that holds plugin data.

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, TClass, Integer, Integer, string, string, string)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aPluginClass: TClass; aMajorVersion: Integer; aMinorVersion: Integer; const aRequiredPrivilege: string; const aDescription: string; const aUserData: string)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aPluginClass: Class of the plugin.
  • aMajorVersion: Major version number.
  • aMinorVersion: Minor version number.
  • aRequiredPrivilege: String that describes the privilege needed to use this pluign.
  • aDescription: String that holds the plugin description.
  • aUserData: String that holds your custom data.

constructor Create (Cardinal, IROClassFactory, Integer, Integer, string, string)

Creates a new instance of the class.

constructor Create(ModuleInstance: Cardinal; const aRemObjectsClassFactory: IROClassFactory; aMajorVersion: Integer; aMinorVersion: Integer; const aDescription: string; const aUserData: string)

Parameters:

  • ModuleInstance: Handle of the module instance. By default HInstance.
  • aRemObjectsClassFactory: Remoting SDK factory instance
  • aMajorVersion: Major version number.
  • aMinorVersion: Minor version number.
  • aDescription: String that holds the plugin description.
  • aUserData: String that holds your custom data.

CreateInstance  override

Creates a new plugin instance. If the plugin instance supports the IHYVCLPlugin interface, this method will set its host to the provided aHost parameter. If instance supports the IHYVCLInstanceCounting interface, this method will call its RegisterFactory method.

Note: You will not call this method directly, to create a new plugin instance you can use one of the THYModuleManager methods, like CreateVisualPlugin or CreateNonVisualPlugin.

procedure CreateInstance(const aHost: IHYVCLHost; out anInstance: IInterface)

Parameters:

  • aHost: Reference to a host instance.
  • anInstance: Reference to a new instance of a plugin.

CreateWrapper  protected    (declared in THYPluginFactory)

function CreateWrapper(aPluginInstance: IDispatch; Descriptor: THYPluginDescriptor): IInterface

Parameters:

  • aPluginInstance:
  • Descriptor:

Descriptor    (declared in THYBasePluginFactory)

Returns the descriptor of the plugin that is represented by the factory.

property Descriptor: THYCrossPlatformPluginDescriptor read write

GetInstanceCount  protected override    (declared in THYPluginFactory)

Gets the count of plugin instances that were created by this factory.

function GetInstanceCount: Integer

InstanceCount    (declared in THYBasePluginFactory)

Returns the count of plugin instances that were created by this factory.

property InstanceCount: Integer read write

InstanceDestroying    (declared in THYPluginFactory)

If the plugin instance supports the IHYInstanceCounting interface, it will call this method to notify the factory about instance destruction.

procedure InstanceDestroying

ModuleCreateInstance  protected virtual    (declared in THYPluginFactory)

function ModuleCreateInstance: IInterface

 

Descriptor    (declared in THYBasePluginFactory)

Returns the descriptor of the plugin that is represented by the factory.

property Descriptor: THYCrossPlatformPluginDescriptor read write

InstanceCount    (declared in THYBasePluginFactory)

Returns the count of plugin instances that were created by this factory.

property InstanceCount: Integer read write

 

constructor Create    (declared in THYBasePluginFactory)

Creates a new instance of the class.

constructor Create

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, THYCrossPlatformPluginDescriptor)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aDescriptior: THYCrossPlatformPluginDescriptor)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aDescriptior: Reference to a descriptor object that holds plugin data.

constructor Create (Cardinal, string, THYCrossPlatformPluginCreatorFunc, TClass, Integer, Integer, string, string, string)  overload    (declared in THYPluginFactory)

Creates a new instance of the class.

constructor Create(aModuleInstance: Cardinal; const aPluginName: string; aCreatorFunc: THYCrossPlatformPluginCreatorFunc; aPluginClass: TClass; aMajorVersion: Integer; aMinorVersion: Integer; const aRequiredPrivilege: string; const aDescription: string; const aUserData: string)

Parameters:

  • aModuleInstance: Handle of the module instance. By default HInstance.
  • aPluginName: Name of the plugin.
  • aCreatorFunc: Function that will be used to create new plugin instances.
  • aPluginClass: Class of the plugin.
  • aMajorVersion: Major version number.
  • aMinorVersion: Minor version number.
  • aRequiredPrivilege: String that describes the privilege needed to use this pluign.
  • aDescription: String that holds the plugin description.
  • aUserData: String that holds your custom data.

constructor Create (Cardinal, IROClassFactory, Integer, Integer, string, string)

Creates a new instance of the class.

constructor Create(ModuleInstance: Cardinal; const aRemObjectsClassFactory: IROClassFactory; aMajorVersion: Integer; aMinorVersion: Integer; const aDescription: string; const aUserData: string)

Parameters:

  • ModuleInstance: Handle of the module instance. By default HInstance.
  • aRemObjectsClassFactory: Remoting SDK factory instance
  • aMajorVersion: Major version number.
  • aMinorVersion: Minor version number.
  • aDescription: String that holds the plugin description.
  • aUserData: String that holds your custom data.

CreateInstance  override

Creates a new plugin instance. If the plugin instance supports the IHYVCLPlugin interface, this method will set its host to the provided aHost parameter. If instance supports the IHYVCLInstanceCounting interface, this method will call its RegisterFactory method.

Note: You will not call this method directly, to create a new plugin instance you can use one of the THYModuleManager methods, like CreateVisualPlugin or CreateNonVisualPlugin.

procedure CreateInstance(const aHost: IHYVCLHost; out anInstance: IInterface)

Parameters:

  • aHost: Reference to a host instance.
  • anInstance: Reference to a new instance of a plugin.

CreateWrapper  protected    (declared in THYPluginFactory)

function CreateWrapper(aPluginInstance: IDispatch; Descriptor: THYPluginDescriptor): IInterface

Parameters:

  • aPluginInstance:
  • Descriptor:

GetInstanceCount  protected override    (declared in THYPluginFactory)

Gets the count of plugin instances that were created by this factory.

function GetInstanceCount: Integer

InstanceDestroying    (declared in THYPluginFactory)

If the plugin instance supports the IHYInstanceCounting interface, it will call this method to notify the factory about instance destruction.

procedure InstanceDestroying

ModuleCreateInstance  protected virtual    (declared in THYPluginFactory)

function ModuleCreateInstance: IInterface