Interface Procedure

All Known Implementing Classes:
AddOnProcedure, AppListProcedure, ConnectionListProcedure, ConnectionMetricsProcedure, ConnectionValidateProcedure, JsProcedure, PluginInstallProcedure, PluginListProcedure, PluginLoadProcedure, PluginUninstallProcedure, PluginUnloadProcedure, Procedure, ProcedureCallProcedure, ProcedureDeleteProcedure, ProcedureListProcedure, ProcedureMetricsProcedure, ProcedureReadProcedure, ProcedureTraceProcedure, ProcedureTypesProcedure, ProcedureWriteProcedure, ResetProcedure, SessionAuthenticateProcedure, SessionAuthenticateTokenProcedure, SessionCurrentProcedure, SessionTerminateProcedure, StatusProcedure, StorageCopyProcedure, StorageDeleteProcedure, StorageListProcedure, StorageQueryProcedure, StorageReadProcedure, StorageWriteProcedure, ThreadContextProcedure, ThreadCreateProcedure, ThreadInterruptProcedure, ThreadListProcedure, TypeListProcedure, UserAccessProcedure, UserAuthenticationTokenProcedure, UserChangeProcedure, UserListProcedure, UserPasswordChangeProcedure, UserSearchProcedure, UserSettingsProcedure

public interface Procedure
A procedure that can be called for execution from the public API. Normally a procedure wraps a parameterized call to an external system (such as an SQL query), but more complex procedures are also possible using JavaScript.

There are two types of procedures — add-on and built-in. The add-on procedures are created and modified by the user with a set of configurable parameters (e.g. SQL text, connection pool names, etc). The built-in procedures are basically singleton procedures that cannot be modified by the user. The latter type provides services needed by the platform, such as introspection, administration and control.

Each procedure has a number of bindings, containing any resources required during execution. The bindings have different types to clarify their content, such as input argument, static data, adapter pool name or referenced procedure name.

Most classes implementing this interface should be subclasses of the AddOnProcedure class and follow the requirements for serialization and configurability defined by that class. Otherwise the procedure is considered a built-in procedure and is responsible for its own initialization and security checks. Great care must be taken when implementing this interface so that any sensitive operation is properly checked for security.

See Also:
  • Method Summary

    Modifier and Type
    call(CallContext cx, Bindings bindings)
    Executes a call of this procedure in the specified context and with the specified call bindings.
    Returns the bindings for this procedure.
    Returns the procedure description.
    Returns the procedure name.
  • Method Details

    • getName

      String getName()
      Returns the procedure name.
      the procedure name
    • getDescription

      String getDescription()
      Returns the procedure description.
      the procedure description
    • getBindings

      Bindings getBindings()
      Returns the bindings for this procedure. If this procedure requires any special data, adapter connection or input argument binding, those bindings should be set (but possibly to null or blank values).
      the bindings for this procedure
    • call

      Object call(CallContext cx, Bindings bindings) throws ProcedureException
      Executes a call of this procedure in the specified context and with the specified call bindings. The semantics of what the procedure actually does, is up to each implementation. Note that the call bindings are normally inherited from the procedure bindings with arguments bound to their call values.
      cx - the procedure call context
      bindings - the call bindings to use
      the result of the call, or null if the call produced no result
      ProcedureException - if the call execution caused an error