mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/comms/CommsMgrImpl.java
private void processRemoteLinkLayerEvent(final Event event)
    {
        //pull out event props
        final int systemId = (Integer)event.getProperty(RemoteConstants.REMOTE_EVENT_PROP_CONTROLLER_ID);
        final String topic = event.getTopic(); 
        final java.util.UUID uuid = java.util.UUID.fromString((String)event.
                getProperty(FactoryDescriptor.EVENT_PROP_OBJ_UUID));
        
        final CommsLayerLinkModel link = (CommsLayerLinkModel)findLayer(uuid, m_LinkLayers.get(systemId));

        if (link == null)
        {
            Logging.log(LogService.LOG_DEBUG, 
                    "Cannot update link - link layer does not exist on controller 0x%08x", systemId);
        }
        else
        {
            if (topic.contains(LinkLayer.TOPIC_ACTIVATED))
            {
                link.setActivated(true);
                
                //post notice
                m_GrowlMessageUtil.createGlobalFacesMessage(FacesMessage.SEVERITY_INFO, "Link Activated", 
                        String.format("Controller 0x%08x activated link layer %s", systemId, link.getName()));
            }
            else if (topic.contains(LinkLayer.TOPIC_DEACTIVATED))
            {
                link.setActivated(false);
                
                //post notice
                m_GrowlMessageUtil.createGlobalFacesMessage(FacesMessage.SEVERITY_INFO, "Link Deactivated", 
                        String.format("Controller 0x%08x deactivated link layer %s", systemId, link.getName()));
            }
            else if (topic.contains(LinkLayer.TOPIC_STATUS_CHANGED))
            {                  
                final LinkStatus status = (LinkStatus)event.getProperty(LinkLayer.EVENT_PROP_LINK_STATUS);
                link.setStatus(status);                
                
                //post notice
                m_GrowlMessageUtil.createGlobalFacesMessage(FacesMessage.SEVERITY_INFO, "Link Status Changed", 
                        String.format("Controller 0x%08x updated link layer %s with new status", systemId, 
                            link.getName()));
            } 
        }
    }
/**
     * Method for updating a link layer based on the remote message received.  
     * @param event
     *      event properties
     */
Method for updating a link layer based on the remote message received.
@param event
event properties
Method for updating a link layer based on the remote message received . @param event event properties
private void processRemoteLinkLayerEvent(final Event event)
    {
        final int systemId = (Integer)event.getProperty(RemoteConstants.REMOTE_EVENT_PROP_CONTROLLER_ID);
        final String topic = event.getTopic(); 
        final java.util.UUID uuid = java.util.UUID.fromString((String)event.
                getProperty(FactoryDescriptor.EVENT_PROP_OBJ_UUID));
        final CommsLayerLinkModel link = (CommsLayerLinkModel)findLayer(uuid, m_LinkLayers.get(systemId));
        if (link == null)
        {
            Logging.log(LogService.LOG_DEBUG, 
                    "Cannot update link - link layer does not exist on controller 0x%08x", systemId);
        }
        else
        {
            if (topic.contains(LinkLayer.TOPIC_ACTIVATED))
            {
                link.setActivated(true);
                m_GrowlMessageUtil.createGlobalFacesMessage(FacesMessage.SEVERITY_INFO, "Link Activated", 
                        String.format("Controller 0x%08x activated link layer %s", systemId, link.getName()));
            }
            else if (topic.contains(LinkLayer.TOPIC_DEACTIVATED))
            {
                link.setActivated(false);
                m_GrowlMessageUtil.createGlobalFacesMessage(FacesMessage.SEVERITY_INFO, "Link Deactivated", 
                        String.format("Controller 0x%08x deactivated link layer %s", systemId, link.getName()));
            }
            else if (topic.contains(LinkLayer.TOPIC_STATUS_CHANGED))
            {                  
                final LinkStatus status = (LinkStatus)event.getProperty(LinkLayer.EVENT_PROP_LINK_STATUS);
                link.setStatus(status);                
                m_GrowlMessageUtil.createGlobalFacesMessage(FacesMessage.SEVERITY_INFO, "Link Status Changed", 
                        String.format("Controller 0x%08x updated link layer %s with new status", systemId, 
                            link.getName()));
            } 
        }
    }
private void processRemoteLinkLayerEvent ( final Event event ) { final int systemId = ( Integer ) event . getProperty ( RemoteConstants . REMOTE_EVENT_PROP_CONTROLLER_ID ) ; final String topic = event . getTopic ( ) ; final java . util . UUID uuid = java . util . UUID . fromString ( ( String ) event . getProperty ( FactoryDescriptor . EVENT_PROP_OBJ_UUID ) ) ; final CommsLayerLinkModel link = ( CommsLayerLinkModel ) findLayer ( uuid , m_LinkLayers . get ( systemId ) ) ; if ( link == null ) { Logging . log ( LogService . LOG_DEBUG , "Cannot update link - link layer does not exist on controller 0x%08x" , systemId ) ; } else { if ( topic . contains ( LinkLayer . TOPIC_ACTIVATED ) ) { link . setActivated ( true ) ; m_GrowlMessageUtil . createGlobalFacesMessage ( FacesMessage . SEVERITY_INFO , "Link Activated" , String . format ( "Controller 0x%08x activated link layer %s" , systemId , link . getName ( ) ) ) ; } else if ( topic . contains ( LinkLayer . TOPIC_DEACTIVATED ) ) { link . setActivated ( false ) ; m_GrowlMessageUtil . createGlobalFacesMessage ( FacesMessage . SEVERITY_INFO , "Link Deactivated" , String . format ( "Controller 0x%08x deactivated link layer %s" , systemId , link . getName ( ) ) ) ; } else if ( topic . contains ( LinkLayer . TOPIC_STATUS_CHANGED ) ) { final LinkStatus status = ( LinkStatus ) event . getProperty ( LinkLayer . EVENT_PROP_LINK_STATUS ) ; link . setStatus ( status ) ; m_GrowlMessageUtil . createGlobalFacesMessage ( FacesMessage . SEVERITY_INFO , "Link Status Changed" , String . format ( "Controller 0x%08x updated link layer %s with new status" , systemId , link . getName ( ) ) ) ; } } }
Method for updating a link layer based on the remote message received.
Method for updating a link layer based on the remote message received .
//pull out event props //post notice //post notice //post notice