In contrast to the Java Adapter, which allows calling a static Java method out of the Bridge context, the Java callback described in this chapter works different: On startup of the xUML service, a Java object is created, initialized and started. The Java object triggers callbacks within the xUML service that do something.
The following example illustrates this mechanism: Text entered into a simple Java application frontend is processed by a Bridge service.
Service Access Sequences
The sequence diagram below shows the execution process of a Java service callback.
Figure: Execution Process of a Java Service Callback
Some Example Details
The above mentioned example contains the following implementation details:
Figure: Java Frontend represented by a Simple Java Window
The text entered into this dialog will be given back to the Bridge service via a callback on clicking Send to Bridge.
The callback triggers the sendText operation of the xUML service.
Figure: Implementation within the E2E Bridge: Activity Diagram
Figure: Example Result: Text entered into the Java Frontend appears in the E2E Bridge Application Log
The requirements to allow this behavior are described in detail in the following chapters.
For a more elaborate example of an E2E Bridge - Java communication, see the FTP service example mentioned on FTP Service.