public interface SessionListenerI
SessionListenerI interface delivers SessionI level events to the application.| Modifier and Type | Method and Description |
|---|---|
void |
onSessionEvent(NotificationEventI<SessionI> sessionEvent)
This method delivers a
NotificationEventI object which contains a NotificationType, the object that is
being updated (SessionI), an optional ErrorI object and an optional ResponseData object. |
void onSessionEvent(NotificationEventI<SessionI> sessionEvent)
This method delivers a NotificationEventI object which contains a NotificationType, the object that is
being updated (SessionI), an optional ErrorI object and an optional ResponseData object.
A NotificationType.NEW notification indicates a successful signin to the Contact Control Service and the supplied
SessionI object can then be used to begin communication with the server.
A NotificationType.DELETE notification indicates that the established session has been disconnected. The majority
of API methods will throw an ObjectInvalidException if invoked after the SessionI object has been deleted.
However a small set of API methods for retrieving specific properties are available for the client application after the
SessionI object has been deleted. If an API method is accessible after object deletion it will be specified in the
API documentation. The client application must discontinue use of the identified SessionI object. The
application must also null out all references it holds to the deleted SessionI object as well as all references
it holds to objects obtained from the SessionI such as InteractionI, UserI, ResourceI,
MonitoredUserI , MonitoredInteractionI. This is to ensure that garbage collection of the deleted objects
can occur. On session deletion, NotificationType.DELETE notifications will also be sent to the application for all
the objects obtained within the session (detailed above).
A NotificationType.ERROR notification indicates either a problem with session establishment or a reason for the
session to become disconnected. The accompanying ErrorI object provides details as to the cause.
The CCS API executes this event listener method in the context of the CCS API processing threads. On receiving a notification event, the application must immediately switch executing context from the CCS API processing threads and move processing of the event to application threads.
sessionEvent - an event containing a SessionI notification