Flow for the Locking Service when Sending Multiple Commands to the Host Communications Service
The following flow demonstrates how a client (Red App) adds the locking service to a plug-in that uses the host communications service, when the Red App sends multiple commands in a single session.
-
The Red App locks the TA session using the com.sabre.edge.cf.host.Locking service.
Steps 2-6 are performed in a loop for each command.
-
The Red App sends a command to the host communications service.
-
The service checks to see if the lock is already set on the TA session. The result is positive because the Red App locked the TA session externally.
-
The host communications service sends a command to the host.
-
The host communications service receives the response from the host.
-
The host communications service returns the response to the Red App.
-
The Red App unlocks the TA session when it is done sending all the commands in the session.
Steps 1, 2, and 7 are the most important steps for the Red App because the host communications service tracks the remaining steps.