An incoming communication scenario

In the following scenario, assume that you have a host application that takes a flight number for input and displays information about that flight. This application has been transformed into a ZIETrans RCP application. Another Eclipse RCP-based application takes reservation information including the flight number. When the flight number is entered into this application, it can be transmitted to the ZIETrans RCP application causing the ZIETrans view to be updated with information for that flight number. The following is a code example for this scenario:
IServiceManager serviceManager = RcpRuntimePlugin.getDefault().getServiceManager();
IClientService clientService = serviceManager.getClientService(“theClientId”);
/*--------------------------------------------------------------------------------
// 
// Provides an example of a ZIETrans application receiving information from another 
// application.  This example cannot be executed directly but is provided to 
// highlight the approach required to achieve this functionality.
// 
// @param  Flight number from GUI as a Java String.  This value cannot be 
// <code>null</code>.
// 
*///------------------------------------------------------------------------------ 
    public void inboundToZIETransApplication( String flightNumber )
    {      
        // Save flight number from GUI
        Properties params = new Properties();
        
        params.setProperty( "fltNum",  flightNumber );

        // Get the service manager from singleton plug-in instance.
        IServiceManager serviceManager = 
                                RcpRuntimePlugin.getDefault().getServiceManager();

        // This will be the plug-in session we use to play our macro
        ISessionService aSessionService = null;

        // Find the correct ZIETrans plug-in session
        Collection sessionServices = 
                     serviceManager.retrieveServiceEntries( ServiceType.SESSION );
        Iterator itSessionServices = sessionServices.iterator();
        
        while ( itSessionServices.hasNext() )
        {
            aSessionService = (ISessionService) itSessionServices.next();

            // Assumes the first instance of the ZIETrans plug-in called "myApp" 
            // is the one we want.
            if ( "myApp".getApplicationId().equals( aSessionService ) )
            {
                break;
            }
        }

        // Refer to documentation to see how to launch an RCP plug-in instance if 
        // one is not already launched
        if ( aSessionService != null )
        {
            // Really should check the state in a limited-time loop, 
            // but let's assume we can go ahead
            if ( aSessionService.getSessionServiceState().isOperational() )
            {
                // Ask ZIETrans session service to play the macro with the fltNum 
                // from our GUI
                // Assumes that the macro can start from current screen or from 
                // the results screen.
                aSessionService.playMacro( "displayFlightInfo", params );
            }
        }
    }