You can use the E2E Bridge to implement a Java callback service.
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
![](/download/attachments/2286879/java_callback_sequences.png?version=1&modificationDate=1522919424000&api=v2)
Some Example Details
The above mentioned example contains the following implementation details:
Figure: Java Frontend represented by a Simple Java Window
![](/download/attachments/2286879/java_application_window.png?version=1&modificationDate=1522918702000&api=v2)
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
![](/download/attachments/2286880/java_callback_activity_diagram.png?version=1&modificationDate=1595339730000&api=v2)
Figure: Example Result: Text entered into the Java Frontend appears in the E2E Bridge Application Log
![](/download/attachments/2286879/java_callback_bridge_log.png?version=1&modificationDate=1522918702000&api=v2)
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.