An interceptor invoked by a SLEE application can complete either synchronously or asynchronously.

Completion Method Description

Synchronous

The SIS completes evaluation of the interceptor script all within the boundary of the calling application thread. The interceptor output is immediately available to the application as a result of the invocation.

Asynchronous

The SIS is required to perform some function of the interceptor script in a separate thread. In the meantime, further evaluation of the interceptor script has been suspended, and control returns to the calling application. At some point in the future, evaluation of the interceptor script will continue and eventually complete. When this happens, the SIS will notify the application asynchronously and provide the interceptor output via an event fired on an InterceptorInvocationActivity.

An interceptor will only complete asynchronously if it invokes an interceptor extension component during evaluation, as doing so requires a SLEE event to be fired to the extension component and the SIS to wait for the response before continuing. An interceptor that performs all processing without invoking an interceptor extension component will always complete synchronously.

Tip Where practical it is recommended to use interceptors that complete synchronously whenever possible. Synchronous interceptors incur lower performance overhead and benefit from simpler application code. However an application that invokes SIS interceptors generally has to be implemented to support both synchronous and asynchronous interceptors, as it’s not typically known during application development what functionality an interceptor may require.
Previous page Next page