com.sabre.redapp.example.cf.emu.bridge Sample
The com.sabre.redapp.example.cf.emu.bridge sample demonstrates the Sabre emulator command intercept service. The functionality of this sample communications service is described as follows:
-
The EMU_COMMAND service intercepts the
1KRKLON
command in Sabre emulator, replaces the command with1KRKMUC
, and then displays the response from the modified command. This service also intercepts commands that start with1LA
, but it does not send these commands to the Sabre GDS (host).
The following describes the files that this sample includes:
-
Activator.java
gets an instance of Activator and obtains an authentication token. -
CommandModificationService.java
intercepts an emulator command starting with1KRKLON
and sends the modified command1KRKMUC
to the Sabre host. This class also intercepts command1KRKWAW
, but it does not send them to the Sabre host.
Running the Sample
MySabre API enables the use of the emulator services, however, do not include the sample plug-in in your run configuration at this point in order to demonstrate the emulator commands before and after running the sample.
-
Launch Sabre Red 360 in development mode from Eclipse IDE. Sign in to the Sabre host using Sabre emulator.
-
Type the 1KRKLON command. The host response displays availability from Krakow to London.
-
Type the 1KRKWAW command. The host response displays availability from Krakow to Warsaw.
-
Exit Sabre Red 360.
-
In Eclipse, import the com.sabre.redapp.example.cf.emu.bridge plug-in into your workspace and add it to your run configuration.
-
Launch Sabre Red 360 from your run configuration and log in with your CERT Sabre ID.
-
Log in to the Sabre host using Sabre emulator.
-
To see the EMU_COMMAND service, type the 1KRKLON command.
-
The sample service modifies this command and returns availability from Krakow to Munich.
-
To see the remaining capability in the EMU_COMMAND service, type the 1KRKWAW command. The service intercepts this command without sending the command to the host.