Creating a class that implements F4FHandler

To create a new framework handler, you must first create a class that implements F4FHandler. Two methods must be implemented to support the Framework for Frameworks functionality.

Override isApplicable

Purpose: AppScan® Source calls isApplicable to determine if it should run your handler. If you return True, it will run your handler by calling handleApp. If you return False, nothing further will be called.

Note: isApplicable includes a check at the beginning of the method to ensure the application is a Java application before continuing.

Observe in the example: In the Ejb2xHandler, isApplicable first checks to see if the language is appropriate (as EJB is only present in Java applications). If the application is Java-based, isApplicable then searches for any instances of ejb-jar.xml, which is the required configuration file for an EJB 2 application. If configuration files are found, they are read into the handler and True is returned to let AppScan® Source know that it should call handleApp to deal with the information contained in the configuration files.

Override handleApp

Purpose: AppScan® Source calls handleApp to allow you to determine and set information about the framework or frameworks in use by the current application being scanned. The parameters F4FApp and F4FAction are used to get information about the application and set specifics about how to handle the frameworks that are present and that your handler handles.