Package 

Class Interceptor


  • 
    public final class Interceptor<INTERACTION extends Object, ASSERTION extends Object, ACTION extends Object>
    
                        

    Base class for intercepting the call chain from Kakao-Compose to Compose.

    Interceptors can be provided through KakaoCompose runtime and different Nodes.

    Interceptors are stacked during the runtime for any Kakao-Compose check and perform operations. The stack ordering is following: current BaseNode interceptor -> current BaseNode parents' interceptors -> Kakao-Compose interceptor.

    Any of the interceptors in the chain can break the chain call by setting isOverride to true in onCheck, onPerform or onAll interception functions during the configuration. Doing this will not only prevent underlying interceptors from being invoked, but prevents Kakao-Compose from executing the operation. In that case, responsibility for actually making Espresso call lies on developer.

    For each operation the interceptor invocation cycle will be as follows:

    // For check operation
    onAll?.invoke()
    onCheck?.invoke()
    
    // For perform operation
    onAll?.invoke()
    onPerform?.invoke()