Datasnap.DSCommon.TDSClientCallbackChannelManager.RegisterCallback
Delphi
function RegisterCallback(const CallbackId: string;
const Callback: TDBXCallback): Boolean; overload;
function RegisterCallback(const CallbackId, ChannelNames: string;
const Callback: TDBXCallback): Boolean; overload;
function RegisterCallback(const ChannelNames: string; const Callback: TDBXNamedCallback): Boolean; overload;
function RegisterCallback(const Callback: TDBXNamedCallback): Boolean; overload;
C++
bool __fastcall RegisterCallback(const System::UnicodeString CallbackId, Data::Dbxjson::TDBXCallback* const Callback)/* overload */;
bool __fastcall RegisterCallback(const System::UnicodeString CallbackId, const System::UnicodeString ChannelNames, Data::Dbxjson::TDBXCallback* const Callback)/* overload */;
bool __fastcall RegisterCallback(const System::UnicodeString ChannelNames, Data::Dbxjson::TDBXNamedCallback* const Callback)/* overload */;
bool __fastcall RegisterCallback(Data::Dbxjson::TDBXNamedCallback* const Callback)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Datasnap.DSCommon.pas Datasnap.DSCommon.hpp |
Datasnap.DSCommon | TDSClientCallbackChannelManager |
Description
Registers a callback with the channel manager.
The RegisterCallback method registers a callback with the channel manager. The CallbackId parameter identifies the callback and it is used for peer-to-peer message exchange.
There are two RegisterCallback overloads. The first overload registers the callback via its identifier while the second registers it via its unique name, given as Callback.
RegisterCallback returns True if the registration succeeded or False if the registration failed for any reason (for example, there is already a callback with the same identifier or the same name, a connection with a DataSnap server failed, and so on.)