The server-side bridge connects to each server-side (or remote) web processor via the corresponding web processor adapter. A web processor adapter is a Java class org.webappos.adapters.webproc.[adapter-name].WebProcessor implementng the IWebProcessorAdapter interface.
Normally, for local server-side web processors the "localjava" web processor adapter is used ("localjava" type in <webproctab>). It is implemented in the Java class named org.webappos.adapters.webproc.localjava.WebProcessor.
The "localjava" web processor adapter launches a new local Java VM instance, which launches the local web processor Java class specified in <webproctab> (usually, org.webappos.webproc.DefaultWebProcessor). It is essential that web processors are launched as separate processes, thus, when a process terminates (e.g., because of an exception), the bridge will be able to re-launch it.
Two arguments are passed to the web processor main() function:
id | web processor id assigned by the server-side bridge |
web-processor-bus-service-URL | the URL (for Java RMI protocol) that has to be used by the web processor to connect to Web Processor Bus Service |
When initialized, each web processor must connect to the Web Processor Bus Service to register itself and to obtain pointers to certain server-side bridge APIs (these APIs will provide a synchronized access to the data shared between web processors and the bridge).
When registering, the web processor provides a pointer to its implementation of the IRWebProcessor API (must be implemented in Java; a Java wrapper is required, if the web processor is implemented in another language). This API will be used by the bridge to pass web calls to this web processor.