Class Library

java.lang.Object
org.rapidcontext.core.proc.Library

public class Library extends Object
A procedure library. The library handles procedure aliases, call interceptors and other functions for all procedures.
Version:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Library(Storage storage)
    Creates a new procedure library.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the procedure call interceptor.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Tracing per-procedure will be removed in a future release.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use Procedure.find(storage,id) directly instead.
    void
    Sets the procedure call interceptor, overriding the default.
    void
    setTracing(String name, boolean enabled)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Tracing per-procedure will be removed in a future release.

    Methods inherited from class java.lang.Object

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

    • Library

      public Library(Storage storage)
      Creates a new procedure library.
      Parameters:
      storage - the data storage to use
  • Method Details

    • load

      @Deprecated(forRemoval=true) public Procedure load(String id) throws ProcedureException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Procedure.find(storage,id) directly instead.
      Locates a procedure using either its identifier or an alias.
      Parameters:
      id - the procedure identifier
      Returns:
      the procedure object
      Throws:
      ProcedureException - if the procedure couldn't be found, or failed to load correctly
    • getInterceptor

      public Interceptor getInterceptor()
      Returns the procedure call interceptor.
      Returns:
      the procedure call interceptor
    • setInterceptor

      public void setInterceptor(Interceptor i)
      Sets the procedure call interceptor, overriding the default.
      Parameters:
      i - the procedure call interceptor to use
    • isTracing

      @Deprecated(forRemoval=true) public boolean isTracing(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tracing per-procedure will be removed in a future release. Use per-call tracing instead.
      Checks if all calls to a procedure should be traced.
      Parameters:
      name - the name of the procedure
      Returns:
      true if all calls should be traced, or false otherwise
    • setTracing

      @Deprecated(forRemoval=true) public void setTracing(String name, boolean enabled)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tracing per-procedure will be removed in a future release. Use per-call tracing instead.
      Sets or clears the call tracing for a procedure.
      Parameters:
      name - the name of the procedure
      enabled - true to enabled tracing, false to disable