Sun Java System Portal Server 7 Developer's Guide

Robot Plug-in API Overview

The robot plug-in API is a set of functions and header files that help you create your own robot application functions to use with the directives in robot configuration files. Use this API to create the built-in functions for the directives used in filter.conf (the robot filter configuration file).

When you become familiar with this API, you will be able to override, add, or customize robot functionality. For example, you will be able to create functions that use a custom database for access control, or you can create functions that create custom log files with special entries.

In general, most developers will write RAF functions in C. However, you can define the functions in any language as long as it can build a shared library. If you use C++, you will need to modify the provided C header files to be used by C++ files.

ProcedureTo Create Custom Plug-In Functions

The following steps are a brief overview of the process for creating your own plug-in functions.

Steps
  1. Compile your code to create a shared object (.so) file.

  2. In the Setup directives at the top of filter.conf, you tell the robot to load your shared object file or dynamic-link library.

  3. Write directives that use your plug-in functions in the robot configuration file (filter.conf).

    The PortalServer-base/sdk/robot/include directory contains all the header files you need to include when writing your plug-in functions.

    The PortalServer-base/sdk/robot/examples directory contains sample code, the header files, and a makefile. You should familiarize yourself with the code and samples.