Class Interceptor

java.lang.Object
org.rapidcontext.core.proc.Interceptor
Direct Known Subclasses:
DefaultInterceptor

@Deprecated(forRemoval=true) public abstract class Interceptor extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use ReserveInterceptor or CallInterceptor instead.
A procedure call interceptor. This is an abstract class that allows subclasses to override, monitor or extend any resource reservation or procedure call in the library. Interceptors are chained together, and by default each interceptor delegates calls to its parent interceptor. A default interceptor is available that provides a standard implementation for all methods (necessary since it is the last link in the interceptor chain).
See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a new interceptor and links it to the specified parent interceptor.
  • Method Summary

    Modifier and Type
    Method
    Description
    call(CallContext cx, Procedure proc, Bindings bindings)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Inherit from CallInterceptor instead.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the parent interceptor in the interceptor chain.
    void
    releaseAll(CallContext cx, boolean commit)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Inherit from ReserveInterceptor instead.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Inherit from ReserveInterceptor instead.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Interceptor

      protected Interceptor(Interceptor parent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new interceptor and links it to the specified parent interceptor.
      Parameters:
      parent - the parent interceptor
  • Method Details

    • getParent

      public final Interceptor getParent()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the parent interceptor in the interceptor chain.
      Returns:
      the parent interceptor, or null if no parent is available
    • reserve

      @Deprecated(forRemoval=true) public void reserve(CallContext cx, Procedure proc) throws ProcedureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Inherit from ReserveInterceptor instead.
      Reserves all adapter connections needed for executing the specified procedure. All connections needed by imported procedures will also be reserved recursively.
      Parameters:
      cx - the procedure context
      proc - the procedure definition
      Throws:
      ProcedureException - if the connections couldn't be reserved
      See Also:
    • releaseAll

      @Deprecated(forRemoval=true) public void releaseAll(CallContext cx, boolean commit)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Inherit from ReserveInterceptor instead.
      Releases all reserved adapter connections. The connections will either be committed or rolled back, depending on the commit flag.
      Parameters:
      cx - the procedure context
      commit - the commit (or rollback) flag
      See Also:
    • call

      @Deprecated(forRemoval=true) public Object call(CallContext cx, Procedure proc, Bindings bindings) throws ProcedureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Inherit from CallInterceptor instead.
      Calls a procedure with the specified bindings.
      Parameters:
      cx - the procedure context
      proc - the procedure definition
      bindings - the procedure bindings
      Returns:
      the result of the call, or null if the call produced no result
      Throws:
      ProcedureException - if the call execution caused an error
      See Also: