com.avaya.ccs.api

## Interface ResourceListenerI

-     public interface ResourceListenerI

  An implementing instance of the `ResourceListenerI` interface delivers `ResourceListenerI` level events to the application.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onResourceEvent(NotificationEventI<ResourceI> resourceEvent)` This method delivers a `NotificationEventI` object which contains a `NotificationType`, the object that is being updated (`ResourceI`), an optional `ErrorI` object and an optional `ResponseData` object.

- - ### Method Detail

    - #### onResourceEvent

          void onResourceEvent(NotificationEventI<ResourceI> resourceEvent)

      This method delivers a `NotificationEventI` object which contains a `NotificationType`, the object that is being updated (`ResourceI`), an optional `ErrorI` object and an optional `ResponseData` object.

      A `NotificationType.NEW` notification indicates that a new `ResourceI` object has been added to the session. A `NotificationType.UPDATE` notification indicates that properties of the specified `ResourceI` instance has been modified and the newly supplied `ResourceI` object represents a complete update.

      A `NotificationType.DELETE` notification indicates that the identified `ResourceI` has been deleted. The majority of API methods will throw an `ObjectInvalidException` if invoked after the `ResourceI` object has been deleted. However a small set of API methods for retrieving specific properties are available for the client application after the `ResourceI` 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 the use of the `ResourceI` object and must also null out all references it holds to the deleted `ResourceI` object. This is to ensure that garbage collection of the deleted objects can occur.

      An `NotificationType.ERROR` notification indicates the failure of a `ResourceI` method call made by the client application on one of the `ResourceI` instances. The accompanying `ErrorI` object provides details as to the cause of the error.

      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.

      Parameters:
        `resourceEvent` - an event containing a `ResourceI` notification