The Unified Communications Managed API 2.0 Core SDK is designed for middle-tier applications, for which performance is one of the most important goals. In order to provide this performance and to be consistent with the previous release (Unified Communications Managed APIV1.0), UCMA 2.0 Core SDK supports the BeginXxx/EndXxx pattern to implement asynchronous operations. The application programmer is expected to be familiar with this usage pattern. For more information, see Asynchronous Programming Overview.
UCMA 2.0 Core SDK supports the extensibility of the Call and MediaProvider classes. Those who provide these extensions are expected to provide an API that is consistent with the UCMA 2.0 Core SDK. This includes implementing asynchronous operations using BeginXxx/EndXxx methods, and using queue mechanisms as defined in Queue Usage Model. For more information about extending the Call and MediaProvider classes, see the Advanced Concepts group of topics.
The UCMA 2.0 Core SDK optimizes the implementation of asynchronous operations by not creating a wait handle when the application passes a callback. It is strongly recommended that applications pass a callback method rather than wait on a wait handle. Typically, the EndXxx method is invoked in the callback when it is called after the associated BeginXxx operation has finished. However, if the application chooses to wait on the handle in the IAsyncResult returned from the BeginXxx method, it can do so and the wait handle is created using lazy initialization.
If the application does not pass a callback or access the wait handle, the implicitly created wait handle created is disposed after the EndXxx method is invoked.