> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ILicensingConnectionRecoveryCallback Interface

<Note>
  This interface is implemented in FRE for Linux and Windows.
</Note>

This is a callback interface that can be used when the connection to the license server breaks. It provides a method which is called when the license server is disconnected. This interface and its method are implemented on the client-side.

You need to call the [SetLicensingConnectionRecoveryCallback](/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/setlicensingconnectionrecoverycallback-method) method of the [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface) object to enable ABBYY FineReader Engine to use the interface you implemented.

You can handle the situation when the connection to the licensing server is broken in the following way:

1. Implement the ILicensingConnectionRecoveryCallback interface. Specify the actions which need to be taken after connection break in the implementation of the [OnDisconnect](/fine-reader/engine/api-reference/license-related-objects/ilicensingconnectionrecoverycallback/ondisconnect-method) method of this interface. For example, you can make several attempts to re-establish the network connection, and if successful, call the [RestartLicensing](/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/restartlicensing-method) method of the [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface) object to restart licensing.
2. Call the [SetLicensingConnectionRecoveryCallback](/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/setlicensingconnectionrecoverycallback-method) method of the [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface) object with the reference to this interface as the input parameter to specify that the interface you implemented is to be used to handle connection breakdowns.
3. During your work with FineReader Engine the connection to the license server can break for some reason. If you try to call any method which requires the functional license (any processing method, for example), the OnDisconnect method is called.
4. The OnDisconnect method performs the actions you specified. If the connection is successfully re-established and the work can be continued, this method's return value must be TRUE.
5. In case of success, the operation of the program is continued.

## Method

| Name                                                                                                                               | Description                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [OnDisconnect](/fine-reader/engine/api-reference/license-related-objects/ilicensingconnectionrecoverycallback/ondisconnect-method) | Is called by FineReader Engine when the connection to the license server is broken. |

## Input parameter

This object is the input parameter of the [SetLicensingConnectionRecoveryCallback](/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/setlicensingconnectionrecoverycallback-method) method of the [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface) object.

## Remarks

In Linux, this interface does not work if the Engine object is loaded as an out-of-process server.

## See also

[RestartLicensing](/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/restartlicensing-method)

[Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface)
