Skip Navigation

com.sabre.redapp.example.cf.host Sample

The com.sabre.redapp.example.cf.host sample is an example of the host and locking communications services and the Encode/Decode service. This sample includes the following files:

  • Activator.java gets an Activator instance and obtains an authentication token`.`

  • HostCommandRequestorEditor.java creates a GUI with lock, unlock, and send buttons, and an event listener. It gets a response from the host and adds the \n prefix to the command. This class also gets a reference to the IEncodeDecode service, and adds GUI elements for running the Encode/Decode service.

  • HostCommandRequestorEditorInput.java accepts input in the browser editor.

  • redapp.xml requests authorization to use the com.sabre.edge.cf.host.Communication and com.sabre.edge.cf.host.Locking services.

Running the Sample

  1. In Eclipse, import the com.sabre.redapp.example.cf.host 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. From the Tools > Other menu in Sabre Red 360, choose Host Command Requestor.

  4. Type a host command in the text field and click Send. To enter special characters, use the buttons next to Unlock.

  5. To lock session, specify number of seconds that session should be locked and click Lock button. Session will be unlocked after you click Unlock button or after specified time. If session was unlocked automatically after timeout, you can use Clear Lock ID button to reset Lock ID used while sending commands.

  6. To send multiple host commands, click the Lock button. Type the commands and click Send. Click Unlock afterwards to unlock session.

  7. To send a command returning multiple responses, use the button Send (Multiple Responses).

       

Note
the button Send used for the command returning multiple responses, will cause only the first response is displayed.

 

To demonstrate Encode/Decode, use the Host Command Requestor editor. Choose an option from the list on the right, for example, Airlines or City Codes. Type information to encode or decode, and click the desired button.