Show / Hide Table of Contents

# Interface IPluginContext<T>

Plugin execution context.

###### Namespace: Apache.Ignite.Core.Plugin

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public interface IPluginContext<out T>
        where T : IPluginConfiguration

##### Type Parameters

Name | Description
--- | ---
T |

### Properties

#### Ignite

Gets the Ignite.

##### Declaration

    IIgnite Ignite { get; }

##### Property Value

Type | Description
--- | ---
IIgnite |

#### IgniteConfiguration

Gets the Ignite configuration.

##### Declaration

    IgniteConfiguration IgniteConfiguration { get; }

##### Property Value

Type | Description
--- | ---
IgniteConfiguration |

#### PluginConfiguration

Gets the plugin configuration.

##### Declaration

    T PluginConfiguration { get; }

##### Property Value

Type | Description
--- | ---
T |

### Methods

#### GetExtension(Int32)

Gets a reference to plugin extension on Java side.

Extensions on Java side are configured via PluginProvider.initExtensions(). Extension should implement PlatformExtension interface to be accessible from this method.

##### Declaration

    IPlatformTarget GetExtension(int id)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | id | Extension id. Equal to PlatformExtension.id().

##### Returns

Type | Description
--- | ---
IPlatformTarget | Reference to a plugin extension on Java side.

#### InjectResources(Object)

Injects resources into specified target: populates members marked with InstanceResourceAttribute.

##### Declaration

    void InjectResources(object target)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | target | Target object.

#### RegisterCallback(Int64, PluginCallback)

Registers Java->.NET callback.

##### Declaration

    void RegisterCallback(long callbackId, PluginCallback callback)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | callbackId | Callback id.
PluginCallback | callback | Callback delegate.

#### RegisterExceptionMapping(String, ExceptionFactory)

Registers custom exception mapping: when Java exception of specified class occurs, it will be mapped using provided factory delegate.

##### Declaration

    void RegisterExceptionMapping(string className, ExceptionFactory factory)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | className | Name of the Java exception class to be mapped.
ExceptionFactory | factory | Exception factory delegate.