Apama Documentation : Connecting Apama Applications to External Components : Developing Custom Clients : The Client Software Development Kits : Exception handling and thread safety
Exception handling and thread safety
Exception handling
Several of the methods and functions of the API can throw exceptions if they fail or encounter exceptional circumstances. All of these are of the following type:
*com::apama::EngineException in C++
*com.apama.EngineException in Java
*Apama.EngineException in .NET
An exception contains a text message indicating the nature of the problem encountered.
As there is no notion of exceptions in C, the C API provides an analogous means to verify if a C SDK function succeeded. To check for the success of a C API function, call the AP_CheckException() function after a C API function call, and make sure that it returns AP_TRUE.
Thread safety
All client APIs are thread-safe, unless otherwise specified, in the sense that you can call API methods from any thread. Several background threads are created during the usage of a client API. Events received from a correlator will be handled in one of background threads, so you cannot assume that events will be delivered to you on any particular thread.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback