Skip Navigation

About Emulator Command Intercept

A Red App can be notified about commands that an end-user enters in Sabre emulator, and then modify the command before sending it to the Sabre GDS (informally referred to as "the host").

A Red App can use the emulator intercept command to do any of the following:

  • Intercept a command in Sabre emulator before sending the command to the host, make changes to the command that fulfill the needs of the business, and then send the command to the host

  • Listen for a particular command, apply business logic to substitute or modify the original command, and then use a communications service to send the command to the host

  • Register a command that returns multiple responses, and receive all responses

In order to use the emulator service, you must register your services using a ContextName of EMU_COMMAND, and then add all your code in the process() method of the service implementation.

To communicate with Sabre emulator, your Red App can use the following synchronous services:

  • EMU_COMMAND

These services rely on an action code parameter. An action code is a host command, or any variation of a host command, that SRWRuntime uses to distinguish the service that registers the name EMU_COMMAND.

The action code that the SRWRuntime markup services use is the command for which the Red App's service name is listening. The service registers this command with the Bus.

        Example: A Red App modifies the HOT command, and specifies the EMU_COMMAND with an action code of HOT.

Sabre System Special Characters

To include Sabre system special characters in a host command or response, use the D isplaySpecialCharacters Java class and map special characters in action_code in redapp.xml. The redapp.xml file must be encoded as UTF-8. For more information, see Sabre System Special Characters.

Constraints

Restrictions on Characters in Action Codes

You cannot register a service or event listener with the ¶ character in action_code. Use the § character in place of the ¶ character. This applies to EMU_COMMAND, event listeners, and your own services.

AG Command and Masking of Passwords

Red Apps are not permitted to listen for the AG command. Red Apps that listen for AG will fail certification. Red Apps can listen for all commands with an empty action_code, however, if passwords are returned, they will be masked with the xxxxxx characters.

EP Command

The SRWRuntime communications bus does not pass the EP command to the following:

  • EMU_COMMAND services

  • Event listeners. This includes active listeners from Sabre Scribe scripts.

Registering Multiple Services with Different Action Codes

You can register multiple services with different action codes, however, the service that is executed is the service that registers an action code with the closest match to the command that the end-user enters last.

        Example:    Two services are registered with the following action codes:

        Service A registers action code 1LASLAX.

        Service B registers action code 1.

        If the last or most recent command that the end-user types is 1LASLAX, Service A is called. However, if the user command is 1LASMIA, Service B is called.

Registering for All Commands

Your Red App cannot register for all responses, however, it can register for all commands. If another Red App registers for a specific command, the service in the other Red App is called.

Caution!     If you register a service solely with EMU_COMMAND, and another service registers EMU_COMMAND with action_code of 1 at a later date, you will stop receiving responses, because multiple Red Apps cannot search for the same command.

Processing Time versus Wait Time

If the processing time is less than the waiting time that is set in Sabre emulator, the markup instructions are sent to Sabre emulator.