mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/comms/CommsMgrImpl.java
private synchronized void eventGetAllLayersResponse(final GetLayersResponseData data, final int systemId)
    {
        final CommType type = data.getCommType(); 
        
        switch (type)
        {
            case TransportLayer:
                if (m_TransportLayers.containsKey(systemId))
                {
                    final List<UUID> newUuids = mergeLayersHelper(type, data.getLayerInfoList(), systemId);
                    removeObsoleteLayerHelper(newUuids, m_TransportLayers.get(systemId));                    
                }
                else
                {
                    m_TransportLayers.put(systemId, new ArrayList<CommsLayerBaseModel>());             
                    addAllLayersHelper(type, data.getLayerInfoList(), systemId);
                }
                break;
            case Linklayer:
                if (m_LinkLayers.containsKey(systemId))
                {
                    final List<UUID> newUuids = mergeLayersHelper(type, data.getLayerInfoList(), systemId);
                    removeObsoleteLayerHelper(newUuids, m_LinkLayers.get(systemId));                    
                }
                else
                {
                    m_LinkLayers.put(systemId, new ArrayList<CommsLayerLinkModelImpl>());  
                    addAllLayersHelper(type, data.getLayerInfoList(), systemId); 
                }
                break;
            case PhysicalLink:
                if (m_PhysicalLayers.containsKey(systemId))
                {
                    final List<UUID> newUuids = mergeLayersHelper(type, data.getLayerInfoList(), systemId);
                    removeObsoleteLayerHelper(newUuids, m_PhysicalLayers.get(systemId));                    
                }
                else
                {
                    m_PhysicalLayers.put(systemId, new ArrayList<CommsLayerBaseModel>());
                    addAllLayersHelper(type, data.getLayerInfoList(), systemId);
                }
                break;
            default:
                Logging.log(LogService.LOG_DEBUG, 
                        "Controller 0x%08x process add layers event. Given comm type is invalid.", systemId);
                
                throw new IllegalArgumentException(String.format("Controller 0x%08x cannot process " 
                        + "add layers event. Invalid comm type %s", systemId, type.toString()));                
        }
    }
/**
     * Event response handling for the custom comms namespace's GetAllLayers response.  Each layer is added to its 
     * respective map of layers.  This method is called with the addition of a new controller or as a result
     * of receiving a gateway response.  
     * @param data
     *      the data message that contains the response information
     * @param systemId
     *      the system ID from which the response originated
     */
Event response handling for the custom comms namespace's GetAllLayers response.  Each layer is added to its
respective map of layers.  This method is called with the addition of a new controller or as a result
of receiving a gateway response.
@param data
the data message that contains the response information
@param systemId
the system ID from which the response originated
Event response handling for the custom comms namespace ' s GetAllLayers response . Each layer is added to its respective map of layers . This method is called with the addition of a new controller or as a result of receiving a gateway response . @param data the data message that contains the response information @param systemId the system ID from which the response originated
private synchronized void eventGetAllLayersResponse(final GetLayersResponseData data, final int systemId)
    {
        final CommType type = data.getCommType(); 
        switch (type)
        {
            case TransportLayer:
                if (m_TransportLayers.containsKey(systemId))
                {
                    final List<UUID> newUuids = mergeLayersHelper(type, data.getLayerInfoList(), systemId);
                    removeObsoleteLayerHelper(newUuids, m_TransportLayers.get(systemId));                    
                }
                else
                {
                    m_TransportLayers.put(systemId, new ArrayList<CommsLayerBaseModel>());             
                    addAllLayersHelper(type, data.getLayerInfoList(), systemId);
                }
                break;
            case Linklayer:
                if (m_LinkLayers.containsKey(systemId))
                {
                    final List<UUID> newUuids = mergeLayersHelper(type, data.getLayerInfoList(), systemId);
                    removeObsoleteLayerHelper(newUuids, m_LinkLayers.get(systemId));                    
                }
                else
                {
                    m_LinkLayers.put(systemId, new ArrayList<CommsLayerLinkModelImpl>());  
                    addAllLayersHelper(type, data.getLayerInfoList(), systemId); 
                }
                break;
            case PhysicalLink:
                if (m_PhysicalLayers.containsKey(systemId))
                {
                    final List<UUID> newUuids = mergeLayersHelper(type, data.getLayerInfoList(), systemId);
                    removeObsoleteLayerHelper(newUuids, m_PhysicalLayers.get(systemId));                    
                }
                else
                {
                    m_PhysicalLayers.put(systemId, new ArrayList<CommsLayerBaseModel>());
                    addAllLayersHelper(type, data.getLayerInfoList(), systemId);
                }
                break;
            default:
                Logging.log(LogService.LOG_DEBUG, 
                        "Controller 0x%08x process add layers event. Given comm type is invalid.", systemId);
                throw new IllegalArgumentException(String.format("Controller 0x%08x cannot process " 
                        + "add layers event. Invalid comm type %s", systemId, type.toString()));                
        }
    }
private synchronized void eventGetAllLayersResponse ( final GetLayersResponseData data , final int systemId ) { final CommType type = data . getCommType ( ) ; switch ( type ) { case TransportLayer : if ( m_TransportLayers . containsKey ( systemId ) ) { final List < UUID > newUuids = mergeLayersHelper ( type , data . getLayerInfoList ( ) , systemId ) ; removeObsoleteLayerHelper ( newUuids , m_TransportLayers . get ( systemId ) ) ; } else { m_TransportLayers . put ( systemId , new ArrayList < CommsLayerBaseModel > ( ) ) ; addAllLayersHelper ( type , data . getLayerInfoList ( ) , systemId ) ; } break ; case Linklayer : if ( m_LinkLayers . containsKey ( systemId ) ) { final List < UUID > newUuids = mergeLayersHelper ( type , data . getLayerInfoList ( ) , systemId ) ; removeObsoleteLayerHelper ( newUuids , m_LinkLayers . get ( systemId ) ) ; } else { m_LinkLayers . put ( systemId , new ArrayList < CommsLayerLinkModelImpl > ( ) ) ; addAllLayersHelper ( type , data . getLayerInfoList ( ) , systemId ) ; } break ; case PhysicalLink : if ( m_PhysicalLayers . containsKey ( systemId ) ) { final List < UUID > newUuids = mergeLayersHelper ( type , data . getLayerInfoList ( ) , systemId ) ; removeObsoleteLayerHelper ( newUuids , m_PhysicalLayers . get ( systemId ) ) ; } else { m_PhysicalLayers . put ( systemId , new ArrayList < CommsLayerBaseModel > ( ) ) ; addAllLayersHelper ( type , data . getLayerInfoList ( ) , systemId ) ; } break ; default : Logging . log ( LogService . LOG_DEBUG , "Controller 0x%08x process add layers event. Given comm type is invalid." , systemId ) ; throw new IllegalArgumentException ( String . format ( "Controller 0x%08x cannot process " + "add layers event. Invalid comm type %s" , systemId , type . toString ( ) ) ) ; } }
Event response handling for the custom comms namespace's GetAllLayers response.
Event response handling for the custom comms namespace ' s GetAllLayers response .