
C# |
public sealed class SessionCallback

All Members | Constructors | Methods | Events | ||
Icon | Member | Description |
---|---|---|
![]() | SessionCallback()()() | |
![]() | __dtor()()() | |
![]() | OnException | This event is triggered when an exception occurs within the scope of the given Session. Its handler must be implemented by the application developer.
NOTE: This event will be triggered by a callback thread pool within the API. Although the current thread pool has only a single thread in it, the developer should not assume that the triggering of this method will be done in a serial manner. This means that in principle, these methods can be called at any time and it is the developer's responsibility to make this call thread-safe. |
![]() | OnResponse | This event is triggered when a task response is available. Its handler must be implemented by the application developer.
A task response can be an output result (in the event of success of a task) or an exception (in the event of a task failure).
NOTE: This event will be triggered by a callback thread pool within the API. Although the current thread pool has only a single thread in it, the developer should not assume that the triggering of this method will be done in a serial manner. This means that in principle,these methods can be called at any time and it is the developer's responsibility to make this call thread-safe. |

The SessionCallback should be supplied as an argument when creating or opening a Session. The callback will be invoked whenever a task belonging to the given Session has completed or returned with error.
The SessionCallback will provide the most efficient use of the middleware (as opposed to synchronous task retrieval using Session.FetchTaskOutput).
IMPORTANT NOTE: To avoid missing any events, you must register your event handlers before creating or opening your Session.
Object | |
![]() | SessionCallback |

[Platform.Symphony.Soam.Connection.OpenSession]