Skip Navigation

com.sabre.redapp.example.cf.emu Sample

The com.sabre.redapp.example.cf.emu sample demonstrates the following functionality:

  • com.sabre.edge.cf.emu.ShowInEmulator. This service can send text to Sabre emulator. The text can be either a message that is displayed to end-users or a command that end-users can send from the emulator.

  • com.sabre.edge.cf.emu.ExecuteInEmulator. This service sends a command to the Sabre GDS through Sabre emulator, with options to display either the command, the response, both, or neither, in the emulator.

  • IWorkAreaService functionality. The EmulatorProxyDemoView class in this sample plug-in obtains agent work area data using IWorkAreaService.

The following describes the files that this sample includes:

  • Activator.java gets an instance of SRWRuntime and obtains an authentication token.

  • EmulatorProxyDemoView.java builds a dialog for demonstration purposes and uses IWorkAreaService.

  • redapp.xml includes authorization entries to use the ShowInEmulator and ExecuteInEmulator services.

Running the Sample

1.In Eclipse, import the com.sabre.redapp.example.cf.emu plug-in into your workspace and add it to your run configuration. 2. Launch Sabre Red 360 from your run configuration and log in to the Sabre host using Sabre emulator. 3. From the Tools menu, choose Open Emu Demo View.

Demonstrating com.sabre.edge.cf.emu.ShowInEmulator

  1. Using the EmulatorDemoView window, type a valid host command in the text box.

  1. Choose one of the following options:

    • To send the command to the emulator as a message, do not select Command. Click Send to Emulator. This option places the cursor on the line following the command, so that you cannot modify it.

    • To send your command as a command to Sabre emulator, select the Command checkbox and click Send to Emulator. This option places the cursor at the end of the line, which lets you either modify or send it.

In the following figure, the emulator displays the command that is typed in the view.

sdksample cf emu1 sized

 

Demonstrating com.sabre.edge.cf.emu.ExecuteInEmulator

  1. Using the EmulatorDemoView GUI, type a valid command in the text box.

  1. Select the check boxes for the options that you want:

    • Show Response to display the response in the emulator

    • Show Command to display the command in the emulator

    • Show both the command and response in the emulator

        To disable the display, do not select any check boxes.

  1. Click Send to Host.

In the following figure, the emulator displays the command and response in the EmulatorDemoView window.

sdksample cf emu2sendcmndandresp resize

 

Demonstrating Agent Work Area Data

  1. Sign in to the Sabre host using Sabre emulator. You can also sign into multiple emulators.

  1. From the Tools menu, choose Open Emu Demo View.

  2. To retrieve the current work area, click Check Current Work Areas.

  3. To retrieve the active work areas, click Check Active Work Areas.

Agent work area data is displayed for all your signed-in work areas.

sample cf emu agentworkareadata