Changes between Initial Version and Version 1 of maestro/MaestroAPI/2.1ApiChanges


Ignore:
Timestamp:
Apr 6, 2010, 3:27:58 AM (14 years ago)
Author:
jng
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • maestro/MaestroAPI/2.1ApiChanges

    v1 v1  
     1= MaestroAPI 2.1 changes =
     2
     3== ServerConnectionI creation ==
     4
     5The public constructors of HttpServerConnection and LocalNativeConnection are now deprecated. They will be eventually removed in a future release.
     6
     7The current way to create a http server connection for example, is like this:
     8
     9{{{
     10MaestroAPI.ServerConnectionI connection = new MaestroAPI.HttpServerConnection(url, sessionID, locale);
     11}}}
     12
     13The new way to create a http server connection, is like this:
     14{{{
     15MaestroAPI.ServerConnectionI connection = MaestroAPI.ConnectionProviderRegistry.CreateConnection("Maestro.Http", "Url=" + url + ";SessionId=" + sessionID + ";Locale=" + locale + ";AllowUntestedVersion=true");
     16}}}
     17
     18A xml provider registry (ConnectionProviders.xml) contains all the known implementations of ServerConnectionI. This file must be in the same path as the MaestroAPI dll.
     19
     20The reason for this change is that it allows us to easily include a new implementation of ServerConnectionI in the future as part of the MaestroAPI dll, or as an external dll that references the MaestroAPI dll. For example, one could implement ServerConnectionI for the [http://www.georest.org GeoREST] MapGuide extension in a custom dll, register this dll into the ConnectionProviders.xml and be able to use this implementation straight away assuming you know the initialization parameters for this particular implementation.
     21
     22For convenience, a helper utility class (ConnectionFactory) exists so that you can create your connections using your existing signatures. For example to create a http server connection using the helper class is like this:
     23
     24{{{
     25MaestroAPI.ServerConnectionI connection = MaestroAPI.ConnectionFactory.CreateHttpConnection(url, sessionID, locale);
     26}}}