RemoteDataAdapter

Overview

The RemoteDataAdapter represents client-side access to data tables published on the server.

It can be used to retrieve schema information, to execute commands, to fill a data table(s) with data from the server or to apply local updates back to the server. It can also perform login, if required.

By default, a newly instantiated RemoteDataAdapter is configured for the standard services provided by Data Abstract 4.0 servers, like IDataAbstractService and IBaseLoginService with correspondent names DataService LoginService . However, it's customizable in several ways:

  • If you've changed only names of any mentioned services on your server, simply call setDataServiceName / setLoginServiceName methods of the RemoteDataAdapter to change them on client as well.
  • If you need more advanced configuration for service calls, you can provide your own implementation of IDataAbstractService or IBaseLoginService and set it with setDataService / setLoginService methods.

Other components as data streamer, client channel, message can be also configured manually by using appropriate setter methods. You don't need to deal with it in most cases though. Use create() instead - a static methods that supports URL Schemes and will return preconfigured instance of RemoteDataAdapter class according to provided server target Url.

The RemoteDataAdapter gives possibility to work with DA server in both synchronous(blocking) and asynchronous(non-blocking) way. Last one will be very convenient on mobile platforms, that either prevent or even forbid synchronous network operation in the main (UI) thread. Therefore, for almost every do method you may find its doAsync clone. All async methods return RequestTask inheritors: the one difference between these inheritors is in type of returned result. fill and applyChanges tasks will have void result, they just update correspondent instances of datatables; executeCommand in turn provides getCommandResult property to get the comand executoin result. The similar situation with readSchema that provides getSchema and login that contains getLogged method.

Location

 

constructor

Default constructor that creates an instance of RemoteDataAdapter class with default data and login service names.

 

constructor

 

RemoteDataAdapter()

constructor (String, String)

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

constructor(dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(String dataServiceName, String loginServiceName)

Parameters:

  • dataServiceName: A custom name that will be used to talk to data service.
  • loginServiceName: A custom name that will be used to talk to login service. If null or empty string is passed, then default will be used. you can pass null here if you know that you server doesn't requires authentication.

constructor (URI)

Creates an instance of RemoteDataAdapter and sets custom names of remote services.

 

constructor(url: URI)

 

RemoteDataAdapter(URI url)

Parameters:

  • url: server url

constructor (URI, String)

Creates an instance of RemoteDataAdapter and sets custom names of remote services.

 

constructor(url: URI; dataServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName)

Parameters:

  • url: server url
  • dataServiceName: A custom name that will be used to talk to data service.

constructor (URI, String, String)

Creates an instance of RemoteDataAdapter and sets custom names of remote services.

 

constructor(url: URI; dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url: server url
  • dataServiceName: A custom name that will be used to talk to data service.
  • loginServiceName: A custom name that will be used to talk to login service. If null or empty string is passed, then default will be used. you can pass null here if you know that you server doesn't requires authentication.

AcceptTableChanges

If true, the adapter will apply changes for tables if they have been successfully applied on the server. Default mode.
If false, all local table changes will remain unapplied after method call.

 

property AcceptTableChanges: Boolean read write;

 

Boolean AcceptTableChanges { __get; __set; }

addListener

Add a subscriber to adapter's notifications.

 

method addListener(aListener: RemoteDataAdapterListener)

 

void addListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of RemoteDataAdapterListener interface implementation - adapters notification listener interface. If you need to subscribe on just some notification(s), you can use AbstractRemoteDataAdapter class by extending it and overriding only necessary methods.

applyChanges (DataTable)

apply changes that were made locally with specific data table to the server.

 

method applyChanges(aDataTable: DataTable)

 

void applyChanges(DataTable aDataTable)

Parameters:

  • aDataTable: a data table with changes to be sent.

applyChanges (DataTable[])

apply local changes of a set of data tables up to the server.

 

method applyChanges(aDataTablesArray: array of DataTable)

 

void applyChanges(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: a set of tables with changes to be sent.

applyChanges (Delta[])

apply changes from passed set of deltas up to the server. This overload doesn't need a data table to collect changes, but a manually created array of deltas.

 

method applyChanges(aDeltasArray: array of Delta)

 

void applyChanges(Delta[] aDeltasArray)

Parameters:

  • aDeltasArray: an array of deltas to send to the server.

applyChangesAsync (DataTable, Callback): UpdateRequestTask

Asynchronously applies local data table changes to the server.

 

method applyChangesAsync(aDataTable: DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: a data table with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (DataTable[], Callback): UpdateRequestTask

Asynchronously applies local data tables' changes to the server.

 

method applyChangesAsync(aDataTablesArray: array of DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: A set of tables with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (Delta[], Callback): UpdateRequestTask

Asynchronously applies changes from the given deltas' set to the server. This overload doesn't need data tables to collect changes, but a manually created array of deltas.

 

method applyChangesAsync(aDeltasArray: array of Delta; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(Delta[] aDeltasArray, Callback aCallback)

Parameters:

  • aDeltasArray: An array of deltas to send to the server.
  • aCallback: An instance of a callback that will be notified after an update request finish.

AutoCreateServices

Mode for creation a proxy classes to remote data and login services.

Default value is true, which allows the adapter to create instances of the DataAbstractService_Proxy and the BaseLoginService_Proxy on the first call to DataService and LoginService correspondently (either by user or by internal adapter's code). In case of false, the services should be assigned by the user, or an exception will be thrown on the next call to the server.

 

property AutoCreateServices: Boolean read write;

 

Boolean AutoCreateServices { __get; __set; }

ClientChannel

Client chanel to be used by adapter's instance to talk to the server.

 

property ClientChannel: ClientChannel read write;

 

ClientChannel ClientChannel { __get; __set; }

create (URI): RemoteDataAdapter

Returns a preconfigured instance of the RemoteDataAdapter based on provided server target URI.

 

class method create(url: URI): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url)

Parameters:

  • url: a server target URI.

create (URI, String): RemoteDataAdapter

Returns a preconfigured instance of the RemoteDataAdapter based on provided server target URI and aditionally sets custom name of the remote data service.

 

class method create(url: URI; dataServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName)

Parameters:

  • url: a server target URI.
  • dataServiceName: a custom name of server data service.

create (URI, String, String): RemoteDataAdapter

Returns a preconfigured instance of the RemoteDataAdapter based on provided server target URI and aditionally sets custom names of the remote data and login services.

 

class method create(url: URI; dataServiceName: String; loginServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url: a server target URI.
  • dataServiceName: a custom name of server data service.
  • loginServiceName: a custom name of server login service. Default name is used if null or empty value was passed.

DataService

Data service proxy interface implementation.

If adapter's AutoCreateServices mode is true, then data service proxy instance will be created automatically on first call to this method. Otherwise, it will try to return the proxy class instance if it was previously assigned.

 

property DataService: IDataAbstractService read write;

 

IDataAbstractService DataService { __get; __set; }

DataServiceName

Name of remote Data service. Default value is DataService.

 

property DataServiceName: String read write;

 

String DataServiceName { __get; __set; }

DataStreamer

Data streamer instance associated to the adapter. If it hasn't been assigned previously, adapter will create an instance of Bin2DataStreamer automatically.

 

property DataStreamer: DataStreamer read write;

 

DataStreamer DataStreamer { __get; __set; }

DynamicSelect

Flag indicating whether Data Adapter should perform queries using the Dynamic Select feature

 

property DynamicSelect: Boolean read write;

 

Boolean DynamicSelect { __get; __set; }

executeCommand (String): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommand(aName: String): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName)

Parameters:

  • aName: a command name from Schema.

executeCommand (String, String[], Object[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommand(aName: String; aParameterNames: array of String; aParameterValues: array of Object): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, String[] aParameterNames, Object[] aParameterValues)

Parameters:

  • aName: a command name from Schema.
  • aParameterNames: an array of connamd parameter names.
  • aParameterValues: an array of command parameter values.

executeCommand (String, DataParameter[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommand(aName: String; inParams: array of DataParameter): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, DataParameter[] inParams)

Parameters:

  • aName: a command name from Schema.
  • inParams: an array of command parameters.

executeCommandAsync (String, Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommandAsync(aName: String; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, String[], Object[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommandAsync(aName: String; aParameterNames: array of String; aParameterValues: array of Object; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, String[] aParameterNames, Object[] aParameterValues, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aParameterNames: An array of connamd parameter names.
  • aParameterValues: An array of command parameter values.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, DataParameter[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommandAsync(aName: String; inParams: array of DataParameter; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, DataParameter[] inParams, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • inParams: An array of command parameters.
  • aCallback: An instance of a callback that will be notified after a command request finish.

fill (DataTable)

The method fills the given data table with the data from the server. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fill(aDataTable: DataTable)

 

void fill(DataTable aDataTable)

Parameters:

  • aDataTable: a data table instance to fill.

The method fills given data table with the data from the server. This overload gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo)

 

void fill(DataTable aDataTable, TableRequestInfo aTableRequestInfo)

Parameters:

  • aDataTable: a data table instance for filling.
  • aTableRequestInfo: a table request object instance for applying during request.

The method fills given data table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fill(aDataTable: DataTable; aWhereClause: WhereExpression)

 

void fill(DataTable aDataTable, WhereExpression aWhereClause)

Parameters:

  • aDataTable: a data table instance for filling.
  • aWhereClause: a Dynamic Where clause for applying during request.

fill (DataTable[])

The method fills given data tables with the data from the server.

 

method fill(aDataTablesArray: array of DataTable)

 

void fill(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: an array of data tables to fill.

The method fills given data tables with the data from the server. This overload gives you significant possibilities to customize your fill requests, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo)

 

void fill(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aTableRequestInfosArray: an array of table request objects for applying during the fill request.

The method fills given data tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fill(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression)

 

void fill(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aWhereClauses: an array of Dynamic Where clauses for applying during the fill request.

fillAsync (DataTable, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fillAsync(aDataTable: DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, TableRequestInfo, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, TableRequestInfo aTableRequestInfo, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aTableRequestInfo: A table request object instance to apply during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, WhereExpression, Callback): FillRequestTask

The asynchronous version of method that fills given table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fillAsync(aDataTable: DataTable; aWhereClause: WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, WhereExpression aWhereClause, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aWhereClause: a Dynamic Where clause for applying during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], Callback): FillRequestTask

The method fills given data tables' set with the data from the server in an asynchronous manner.

 

method fillAsync(aDataTablesArray: array of DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of data tables to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], TableRequestInfo[], Callback): FillRequestTask

The method fills given tables' array with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aTableRequestInfosArray: An array of request info objects for applying during the fill request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], WhereExpression[], Callback): FillRequestTask

The asynchronous version of method that fills given tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fillAsync(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aWhereClauses: An array of Dynamic Where objects for applying during the fill request. Each item in array should correspond to the item from aDataTablesArray at the same index.
  • aCallback: A callback instance to be notified after a fill request finish.

fillWithSql

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

method fillWithSql(dataTable: DataTable; sql: String; parameters: array of DataParameter)

 

void fillWithSql(DataTable dataTable, String sql, DataParameter[] parameters)

Parameters:

  • dataTable: a data table instance for filling.
  • sql: A DA SQL query string.
  • parameters: Optional parameters, if such required by SQL string.

fillWithSqlAsync

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood asynchronously.

 

method fillWithSqlAsync(dataTable: DataTable; sql: String; parameters: array of DataParameter; callback: Callback): FillRequestTask

 

FillRequestTask fillWithSqlAsync(DataTable dataTable, String sql, DataParameter[] parameters, Callback callback)

Parameters:

  • dataTable: A data table instance to fill.
  • sql: A DA SQL query string.
  • parameters: Optional parameters, if such required by SQL string.
  • callback: A callback instance to be notified after a fill request finish.

finalize  protected

Releases all resources that could possibly be used by the adapter's instance.

 

method finalize

 

void finalize()

ForceApplySchema

If it's true, the data adapter will request table schema within each data request.
Having false here, the adapter will request only data package and tries to merge it into the data table that have been previously initialized.

 

property ForceApplySchema: Boolean read write;

 

Boolean ForceApplySchema { __get; __set; }

login (String): Boolean

This methods tries to login with the given user name, password and connection name. Used for cases when the server side service has multiple connections.

 

method login(aLoginString: String): Boolean

 

Boolean login(String aLoginString)

Parameters:

  • aLoginString: a preformatted LoginEx string.

login (String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String): Boolean

 

Boolean login(String aUserName, String aPassword)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.

login (String, String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String; aConnectionName: String): Boolean

 

Boolean login(String aUserName, String aPassword, String aConnectionName)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.

loginAsync (String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name, password and connection name. It's used in case server side service has multiple connections.

 

method loginAsync(aLoginString: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aLoginString, Callback aCallback)

Parameters:

  • aLoginString: A preformatted LoginEx string.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aConnectionName: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, String aConnectionName, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.
  • aCallback: A callback instance to be notified after a login request finish.

LoginService

Returns the login service proxy interface implementation.

If AutoCreateServices mode is true, then login service proxy instance will be created automatically on first call to this method. Otherwise, it will try to return the proxy class instance if it was previously assigned.

 

property LoginService: IBaseLoginService read write;

 

IBaseLoginService LoginService { __get; __set; }

LoginServiceName

Returns the name of remote Login service. Default value is LoginService.

 

property LoginServiceName: String read write;

 

String LoginServiceName { __get; __set; }

logout

Performs the log out.

 

method logout

 

void logout()

logoutAsync

Performs the log out asynchronously.

 

method logoutAsync(aCallback: Callback): LoginRequestTask

 

LoginRequestTask logoutAsync(Callback aCallback)

Parameters:

  • aCallback: A callback instance to be notified after a login request finish.

Message

Returns the message instance to be used by the data adapter to talk to the server.

 

property Message: Message read write;

 

Message Message { __get; __set; }

readSchema

The method returns a Schema for the Data Abstract service and caches it to avoid redundant server load. If adapter has cached schema, method returns this instance without extra network call.

 

method readSchema(forceReload: Boolean): Schema

 

Schema readSchema(Boolean forceReload)

Parameters:

  • forceReload: If true, methods forces to redownload schema from the server in spite of the cached value.

readSchemaAsync

The method returns a Schema for the Data Abstract service asynchronously and caches it to avoid redundant server load. If adapter has cached schema, method returns this instance without extra network call.

 

method readSchemaAsync(aForceReRead: Boolean; aCallback: Callback): SchemaRequestTask

 

SchemaRequestTask readSchemaAsync(Boolean aForceReRead, Callback aCallback)

Parameters:

  • aForceReRead: If true, methods forces to redownload schema from the server in spite of the cached value.
  • aCallback: A callback instance to be notified after schema request finishes.

removeListener

removes adapter's listener, if it was actually subscribed (by calling addListener method).

 

method removeListener(aListener: RemoteDataAdapterListener)

 

void removeListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of the listener to remove.

shutdown

The method should be called when you don't need the instance any more. Internally, it will release resources if any have been acquired by the adapter.

 

method shutdown

 

void shutdown()

Status

Returns what RemoteDataAdapter instance is doing right now.

 

property Status: DataAdapterStatus read;

 

DataAdapterStatus Status { __get; }

TaskCallbackExecutor

If not assigned, callback code will be invoked in the same thread as the async task itself (by default, it's not the thread where adapter's async method has been called). If assigned, it will be used on asynchronous methods' completion to invoke callback code (if available). It may be helpful, for example, if you want to invoke your callbacks in specific thread (usually in UI thread, as you may want to show message/ update control state etc.).

Note, that if you need to invoke just a few callbacks of async tasks, the consider using RequestTask for specific async task instance. In this case, only single task will be invoked with the given Executor; other async tasks' callbacks won't share it.

 

property TaskCallbackExecutor: Executor read write;

 

Executor TaskCallbackExecutor { __get; __set; }

TaskExecutor

If assigned, it will be used in asynchronous methods to invoke server requests and process results.

Hovewer, you don't need to assign it in most cases, as RemoteDataAdapter will use default executor instance, that will invoke async task in a new separate thread immediately (no queues involved). Only if it doesn't suit your needs, consider changing the property.

Default executor won't be return by this method.

 

property TaskExecutor: Executor read write;

 

Executor TaskExecutor { __get; __set; }

 

AcceptTableChanges

If true, the adapter will apply changes for tables if they have been successfully applied on the server. Default mode.
If false, all local table changes will remain unapplied after method call.

 

property AcceptTableChanges: Boolean read write;

 

Boolean AcceptTableChanges { __get; __set; }

AutoCreateServices

Mode for creation a proxy classes to remote data and login services.

Default value is true, which allows the adapter to create instances of the DataAbstractService_Proxy and the BaseLoginService_Proxy on the first call to DataService and LoginService correspondently (either by user or by internal adapter's code). In case of false, the services should be assigned by the user, or an exception will be thrown on the next call to the server.

 

property AutoCreateServices: Boolean read write;

 

Boolean AutoCreateServices { __get; __set; }

ClientChannel

Client chanel to be used by adapter's instance to talk to the server.

 

property ClientChannel: ClientChannel read write;

 

ClientChannel ClientChannel { __get; __set; }

DataService

Data service proxy interface implementation.

If adapter's AutoCreateServices mode is true, then data service proxy instance will be created automatically on first call to this method. Otherwise, it will try to return the proxy class instance if it was previously assigned.

 

property DataService: IDataAbstractService read write;

 

IDataAbstractService DataService { __get; __set; }

DataServiceName

Name of remote Data service. Default value is DataService.

 

property DataServiceName: String read write;

 

String DataServiceName { __get; __set; }

DataStreamer

Data streamer instance associated to the adapter. If it hasn't been assigned previously, adapter will create an instance of Bin2DataStreamer automatically.

 

property DataStreamer: DataStreamer read write;

 

DataStreamer DataStreamer { __get; __set; }

DynamicSelect

Flag indicating whether Data Adapter should perform queries using the Dynamic Select feature

 

property DynamicSelect: Boolean read write;

 

Boolean DynamicSelect { __get; __set; }

ForceApplySchema

If it's true, the data adapter will request table schema within each data request.
Having false here, the adapter will request only data package and tries to merge it into the data table that have been previously initialized.

 

property ForceApplySchema: Boolean read write;

 

Boolean ForceApplySchema { __get; __set; }

LoginService

Returns the login service proxy interface implementation.

If AutoCreateServices mode is true, then login service proxy instance will be created automatically on first call to this method. Otherwise, it will try to return the proxy class instance if it was previously assigned.

 

property LoginService: IBaseLoginService read write;

 

IBaseLoginService LoginService { __get; __set; }

LoginServiceName

Returns the name of remote Login service. Default value is LoginService.

 

property LoginServiceName: String read write;

 

String LoginServiceName { __get; __set; }

Message

Returns the message instance to be used by the data adapter to talk to the server.

 

property Message: Message read write;

 

Message Message { __get; __set; }

Status

Returns what RemoteDataAdapter instance is doing right now.

 

property Status: DataAdapterStatus read;

 

DataAdapterStatus Status { __get; }

TaskCallbackExecutor

If not assigned, callback code will be invoked in the same thread as the async task itself (by default, it's not the thread where adapter's async method has been called). If assigned, it will be used on asynchronous methods' completion to invoke callback code (if available). It may be helpful, for example, if you want to invoke your callbacks in specific thread (usually in UI thread, as you may want to show message/ update control state etc.).

Note, that if you need to invoke just a few callbacks of async tasks, the consider using RequestTask for specific async task instance. In this case, only single task will be invoked with the given Executor; other async tasks' callbacks won't share it.

 

property TaskCallbackExecutor: Executor read write;

 

Executor TaskCallbackExecutor { __get; __set; }

TaskExecutor

If assigned, it will be used in asynchronous methods to invoke server requests and process results.

Hovewer, you don't need to assign it in most cases, as RemoteDataAdapter will use default executor instance, that will invoke async task in a new separate thread immediately (no queues involved). Only if it doesn't suit your needs, consider changing the property.

Default executor won't be return by this method.

 

property TaskExecutor: Executor read write;

 

Executor TaskExecutor { __get; __set; }

 

create (URI): RemoteDataAdapter

Returns a preconfigured instance of the RemoteDataAdapter based on provided server target URI.

 

class method create(url: URI): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url)

Parameters:

  • url: a server target URI.

create (URI, String): RemoteDataAdapter

Returns a preconfigured instance of the RemoteDataAdapter based on provided server target URI and aditionally sets custom name of the remote data service.

 

class method create(url: URI; dataServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName)

Parameters:

  • url: a server target URI.
  • dataServiceName: a custom name of server data service.

create (URI, String, String): RemoteDataAdapter

Returns a preconfigured instance of the RemoteDataAdapter based on provided server target URI and aditionally sets custom names of the remote data and login services.

 

class method create(url: URI; dataServiceName: String; loginServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url: a server target URI.
  • dataServiceName: a custom name of server data service.
  • loginServiceName: a custom name of server login service. Default name is used if null or empty value was passed.

 

constructor

Default constructor that creates an instance of RemoteDataAdapter class with default data and login service names.

 

constructor

 

RemoteDataAdapter()

constructor (String, String)

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

constructor(dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(String dataServiceName, String loginServiceName)

Parameters:

  • dataServiceName: A custom name that will be used to talk to data service.
  • loginServiceName: A custom name that will be used to talk to login service. If null or empty string is passed, then default will be used. you can pass null here if you know that you server doesn't requires authentication.

constructor (URI)

Creates an instance of RemoteDataAdapter and sets custom names of remote services.

 

constructor(url: URI)

 

RemoteDataAdapter(URI url)

Parameters:

  • url: server url

constructor (URI, String)

Creates an instance of RemoteDataAdapter and sets custom names of remote services.

 

constructor(url: URI; dataServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName)

Parameters:

  • url: server url
  • dataServiceName: A custom name that will be used to talk to data service.

constructor (URI, String, String)

Creates an instance of RemoteDataAdapter and sets custom names of remote services.

 

constructor(url: URI; dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url: server url
  • dataServiceName: A custom name that will be used to talk to data service.
  • loginServiceName: A custom name that will be used to talk to login service. If null or empty string is passed, then default will be used. you can pass null here if you know that you server doesn't requires authentication.

addListener

Add a subscriber to adapter's notifications.

 

method addListener(aListener: RemoteDataAdapterListener)

 

void addListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of RemoteDataAdapterListener interface implementation - adapters notification listener interface. If you need to subscribe on just some notification(s), you can use AbstractRemoteDataAdapter class by extending it and overriding only necessary methods.

applyChanges (DataTable)

apply changes that were made locally with specific data table to the server.

 

method applyChanges(aDataTable: DataTable)

 

void applyChanges(DataTable aDataTable)

Parameters:

  • aDataTable: a data table with changes to be sent.

applyChanges (DataTable[])

apply local changes of a set of data tables up to the server.

 

method applyChanges(aDataTablesArray: array of DataTable)

 

void applyChanges(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: a set of tables with changes to be sent.

applyChanges (Delta[])

apply changes from passed set of deltas up to the server. This overload doesn't need a data table to collect changes, but a manually created array of deltas.

 

method applyChanges(aDeltasArray: array of Delta)

 

void applyChanges(Delta[] aDeltasArray)

Parameters:

  • aDeltasArray: an array of deltas to send to the server.

applyChangesAsync (DataTable, Callback): UpdateRequestTask

Asynchronously applies local data table changes to the server.

 

method applyChangesAsync(aDataTable: DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: a data table with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (DataTable[], Callback): UpdateRequestTask

Asynchronously applies local data tables' changes to the server.

 

method applyChangesAsync(aDataTablesArray: array of DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: A set of tables with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (Delta[], Callback): UpdateRequestTask

Asynchronously applies changes from the given deltas' set to the server. This overload doesn't need data tables to collect changes, but a manually created array of deltas.

 

method applyChangesAsync(aDeltasArray: array of Delta; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(Delta[] aDeltasArray, Callback aCallback)

Parameters:

  • aDeltasArray: An array of deltas to send to the server.
  • aCallback: An instance of a callback that will be notified after an update request finish.

executeCommand (String): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommand(aName: String): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName)

Parameters:

  • aName: a command name from Schema.

executeCommand (String, String[], Object[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommand(aName: String; aParameterNames: array of String; aParameterValues: array of Object): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, String[] aParameterNames, Object[] aParameterValues)

Parameters:

  • aName: a command name from Schema.
  • aParameterNames: an array of connamd parameter names.
  • aParameterValues: an array of command parameter values.

executeCommand (String, DataParameter[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommand(aName: String; inParams: array of DataParameter): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, DataParameter[] inParams)

Parameters:

  • aName: a command name from Schema.
  • inParams: an array of command parameters.

executeCommandAsync (String, Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommandAsync(aName: String; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, String[], Object[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommandAsync(aName: String; aParameterNames: array of String; aParameterValues: array of Object; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, String[] aParameterNames, Object[] aParameterValues, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aParameterNames: An array of connamd parameter names.
  • aParameterValues: An array of command parameter values.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, DataParameter[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommandAsync(aName: String; inParams: array of DataParameter; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, DataParameter[] inParams, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • inParams: An array of command parameters.
  • aCallback: An instance of a callback that will be notified after a command request finish.

fill (DataTable)

The method fills the given data table with the data from the server. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fill(aDataTable: DataTable)

 

void fill(DataTable aDataTable)

Parameters:

  • aDataTable: a data table instance to fill.

The method fills given data table with the data from the server. This overload gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo)

 

void fill(DataTable aDataTable, TableRequestInfo aTableRequestInfo)

Parameters:

  • aDataTable: a data table instance for filling.
  • aTableRequestInfo: a table request object instance for applying during request.

The method fills given data table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fill(aDataTable: DataTable; aWhereClause: WhereExpression)

 

void fill(DataTable aDataTable, WhereExpression aWhereClause)

Parameters:

  • aDataTable: a data table instance for filling.
  • aWhereClause: a Dynamic Where clause for applying during request.

fill (DataTable[])

The method fills given data tables with the data from the server.

 

method fill(aDataTablesArray: array of DataTable)

 

void fill(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: an array of data tables to fill.

The method fills given data tables with the data from the server. This overload gives you significant possibilities to customize your fill requests, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo)

 

void fill(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aTableRequestInfosArray: an array of table request objects for applying during the fill request.

The method fills given data tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fill(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression)

 

void fill(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aWhereClauses: an array of Dynamic Where clauses for applying during the fill request.

fillAsync (DataTable, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fillAsync(aDataTable: DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, TableRequestInfo, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, TableRequestInfo aTableRequestInfo, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aTableRequestInfo: A table request object instance to apply during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, WhereExpression, Callback): FillRequestTask

The asynchronous version of method that fills given table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fillAsync(aDataTable: DataTable; aWhereClause: WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, WhereExpression aWhereClause, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aWhereClause: a Dynamic Where clause for applying during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], Callback): FillRequestTask

The method fills given data tables' set with the data from the server in an asynchronous manner.

 

method fillAsync(aDataTablesArray: array of DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of data tables to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], TableRequestInfo[], Callback): FillRequestTask

The method fills given tables' array with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aTableRequestInfosArray: An array of request info objects for applying during the fill request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], WhereExpression[], Callback): FillRequestTask

The asynchronous version of method that fills given tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fillAsync(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aWhereClauses: An array of Dynamic Where objects for applying during the fill request. Each item in array should correspond to the item from aDataTablesArray at the same index.
  • aCallback: A callback instance to be notified after a fill request finish.

fillWithSql

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

method fillWithSql(dataTable: DataTable; sql: String; parameters: array of DataParameter)

 

void fillWithSql(DataTable dataTable, String sql, DataParameter[] parameters)

Parameters:

  • dataTable: a data table instance for filling.
  • sql: A DA SQL query string.
  • parameters: Optional parameters, if such required by SQL string.

fillWithSqlAsync

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood asynchronously.

 

method fillWithSqlAsync(dataTable: DataTable; sql: String; parameters: array of DataParameter; callback: Callback): FillRequestTask

 

FillRequestTask fillWithSqlAsync(DataTable dataTable, String sql, DataParameter[] parameters, Callback callback)

Parameters:

  • dataTable: A data table instance to fill.
  • sql: A DA SQL query string.
  • parameters: Optional parameters, if such required by SQL string.
  • callback: A callback instance to be notified after a fill request finish.

finalize  protected

Releases all resources that could possibly be used by the adapter's instance.

 

method finalize

 

void finalize()

login (String): Boolean

This methods tries to login with the given user name, password and connection name. Used for cases when the server side service has multiple connections.

 

method login(aLoginString: String): Boolean

 

Boolean login(String aLoginString)

Parameters:

  • aLoginString: a preformatted LoginEx string.

login (String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String): Boolean

 

Boolean login(String aUserName, String aPassword)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.

login (String, String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String; aConnectionName: String): Boolean

 

Boolean login(String aUserName, String aPassword, String aConnectionName)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.

loginAsync (String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name, password and connection name. It's used in case server side service has multiple connections.

 

method loginAsync(aLoginString: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aLoginString, Callback aCallback)

Parameters:

  • aLoginString: A preformatted LoginEx string.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aConnectionName: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, String aConnectionName, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.
  • aCallback: A callback instance to be notified after a login request finish.

logout

Performs the log out.

 

method logout

 

void logout()

logoutAsync

Performs the log out asynchronously.

 

method logoutAsync(aCallback: Callback): LoginRequestTask

 

LoginRequestTask logoutAsync(Callback aCallback)

Parameters:

  • aCallback: A callback instance to be notified after a login request finish.

readSchema

The method returns a Schema for the Data Abstract service and caches it to avoid redundant server load. If adapter has cached schema, method returns this instance without extra network call.

 

method readSchema(forceReload: Boolean): Schema

 

Schema readSchema(Boolean forceReload)

Parameters:

  • forceReload: If true, methods forces to redownload schema from the server in spite of the cached value.

readSchemaAsync

The method returns a Schema for the Data Abstract service asynchronously and caches it to avoid redundant server load. If adapter has cached schema, method returns this instance without extra network call.

 

method readSchemaAsync(aForceReRead: Boolean; aCallback: Callback): SchemaRequestTask

 

SchemaRequestTask readSchemaAsync(Boolean aForceReRead, Callback aCallback)

Parameters:

  • aForceReRead: If true, methods forces to redownload schema from the server in spite of the cached value.
  • aCallback: A callback instance to be notified after schema request finishes.

removeListener

removes adapter's listener, if it was actually subscribed (by calling addListener method).

 

method removeListener(aListener: RemoteDataAdapterListener)

 

void removeListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of the listener to remove.

shutdown

The method should be called when you don't need the instance any more. Internally, it will release resources if any have been acquired by the adapter.

 

method shutdown

 

void shutdown()