Platform Symphony .NET API Reference - Version 4.1
SessionCallback Class
NamespacesPlatform.Symphony.SoamSessionCallback
An object that encapsulates the event handlers for the asynchronous receipt of task responses.
Declaration Syntax
C#
public sealed class SessionCallback
Members
All MembersConstructorsMethodsEvents



IconMemberDescription
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.


Remarks

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.
Inheritance Hierarchy
Object
SessionCallback
See Also
[Platform.Symphony.Soam.Connection.CreateSession]
[Platform.Symphony.Soam.Connection.OpenSession]

Assembly: Platform.Symphony.Soam.Net (Module: Platform.Symphony.Soam.Net) Version: 4.1.0.0