The API interface gives you the ability to extend the proxy server's basic functions. By writing plug-ins (application extensions that you create) you can do customized processing like the following:
The basic server request process can be broken up into steps based on the type of processing the server performs during that phase. Each step includes a juncture at which a specified part of your program can execute. By adding API directives to your configuration file, you indicate which of your application functions you want the server to call during a particular step. You can call several application functions during a request process step by including more than one of the API directives for that step.
Your compiled plug-in program is a .DLL, .so, or .o file, depending on your operating system. As the server proceeds through its request process steps, it calls the plug-in application functions associated with each step until one of the functions indicates it has handled the request. If more than one plug-in function is called from a particular step, they are called in the order in which they appear in the configuration file.
If the request is not completed by an application function (either no application function was specified, or the application function for that step returned the code HTTP_NOACTION), the server performs its default action for that step. Note: This is true for all steps except the Service step; the Service step does not have a default action.
For each step in the request process, a configuration directive exists that allows you to specify a customized application function to be called and executed during that step.
If you have multiple plug-in functions that are called from one processing step, the relative order of those directives is sometimes important. Within a step, the functions for that step will be executed in the order in which they are listed.
The NameTrans and Service directives work like the Exec directive and are dependent on its occurrence and placement, relative to other mapping directives, within the configuration file. This means that the server processes the Service, NameTrans, Map, Pass, Exec, Redirect, and Fail directives in their sequential order within the configuration file. When it successfully maps a URL to a file, it does not read or process any subsequent directives for that request.
Note: The NameTrans and Service directives, along with the Map, Pass, Exec, Redirect, and Fail directives, can be configured by using the Request Routing form. Before it is modified, this form shows default settings that appear in the appropriate order for these directives.
ServerInit | /path/file:function_name | ||
PreExit | /path/file:function_name | ||
Authentication | type | /path/file:function_name | |
NameTrans | /URL | /path/file:function_name | |
Authorization | /URL | /path/file:function_name | |
ObjectType | /URL | /path/file:function_name | |
PostAuth | /path/file:function_name | ||
Service | /URL | /path/file:function_name | |
Transmogrifier | /path/file:open_function_name:write_function_name:close_function_name:error_function_name | ||
Log | /URL | /path/file:function_name | |
Error | /URL | /path/file:function_name | |
PostExit | /path/file:function_name | ||
ServerTerm | /path/file:function_name | ||
Midnight | /path/file:function_name | ||
PICSDBLookup | /path/file:function_name | ||
GC Advisor | /path/file:function_name | ||
Proxy Advisor | /path/file:function_name |
Note: A URL template is required with the Service directive if you want path translation to occur.