Skip Navigation

com.sabre.redapp.example.cf.event Sample

The com.sabre.redapp.example.cf.event sample demonstrates asynchronous listening for events.

The following describes the files that this sample includes:

  • Activator.java gets an Activator instance and obtains a logger service.

  • EmuResponseHandler.java listens for a response from Sabre emulator and logs both the command and response.

  • HotelEventHandler.java listens for commands in Sabre emulator that begin with HOT. If the command is equal to or greater than 6 characters, this plug-in opens igougo.com with a search string for city in a browser window.

  • The redapp.xml file registers two event listeners. The event filter EMU_COMMAND listens for commands before they are marked up. The EMU_RESPONSE filter listens for responses before markup. This file is a partial example.

Running the Sample

  1. In Eclipse, import the com.sabre.redapp.example.cf.event plug-in into your workspace and add it to your run configuration.

  2. Launch Sabre Red 360 from your run configuration, and log in with your CERT Sabre ID.

  3. Login to Sabre emulator. Type a command HOTLAX in Sabre emulator to open the igougo.com website in a tab.

        The following figure shows the response that the sample service catches and returns in igougo.com.

       

image53