Interface Interceptor

All Known Implementing Classes:
InFrameInterceptor, SearchContextInterceptor, StaleElementInterceptor, WrapsElementInterceptor

public interface Interceptor

Interface for implementers of interception.

Each implementor must satisfy, that in the intercept(InvocationContext) method body will be called at least once method from current context InvocationContext.invoke().

Author:
Jan Papousek, Juraj Huska
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Determines a priority by which this interceptor should be invoked when intercepting.
    When processing custom logic must satisfy, that at least once will be called method InvocationContext.invoke().
  • Method Details

    • intercept

      Object intercept(InvocationContext context) throws Throwable
      When processing custom logic must satisfy, that at least once will be called method InvocationContext.invoke().
      Parameters:
      context - the current invocation context
      Returns:
      the result of invocation
      Throws:
      Throwable
    • getPrecedence

      int getPrecedence()
      Determines a priority by which this interceptor should be invoked when intercepting. The smaller the precedence is, the later in the life-cycle the interceptor is invoked. It can return negative, 0, or positive values. Graphene default interceptors have 0 precedence.
      Returns: