Sun Java System Web Proxy Server 4.0.11 NSAPI Developer's Guide

Loading and Initializing the SAF

For each shared library (plug-in) containing custom SAFs to be loaded into the Sun Java System Web Proxy Server, add an Init directive that invokes the load-modules SAF to obj.conf.

The syntax for a directive that calls load-modules is:

Init fn=load-modules shlib=[path]sharedlibname funcs="SAF1,...,SAFn"

For example, if you created a shared library animations.so that defines two SAFs do_small_anim() and do_big_anim() and also defines the initialization function init_my_animations, you would add the following directive to load the plug-in:


Init fn=load-modules shlib=animations.so funcs="do_small_anim,do_big_anim,
	init_my_animations"

If necessary, also add an Init directive that calls the initialization function for the newly loaded plug-in. For example, if you defined the function init_my_new_SAF() to perform an operation on the maxAnimLoop parameter, you would add a directive such as the following to magnus.conf:

Init fn=init_my_animations maxAnimLoop=5